Skip to content

Instantly share code, notes, and snippets.

@Cynosphere
Last active July 2, 2020 19:44
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Cynosphere/d6c720fde67d212a4341117bfe6e189f to your computer and use it in GitHub Desktop.
Save Cynosphere/d6c720fde67d212a4341117bfe6e189f to your computer and use it in GitHub Desktop.
PAC3 Player Hull Fix Workaround
local hooks = _G.hooks or hook.GetTable()
hook.Add("pac_OnPartCreated", "PlayerSizeFix", function(part)
if part.owner_id ~= LocalPlayer():UniqueID() then return end
timer.Simple(0.1, function()
if part:GetRootPart():GetOwnerName() ~= "self" then return end
if (part.ClassName == "entity" or part.ClassName == "entity2") then
LocalPlayer().pac_player_size = part.Size
hooks.NotifyShouldTransmit.pac_player_size(LocalPlayer(), true)
end
end)
end)
hook.Add("pac_OnPartRemove", "PlayerSizeFix", function(part)
if part.owner_id ~= LocalPlayer():UniqueID() then return end
timer.Simple(0.1, function()
if part:GetRootPart():GetOwnerName() ~= "self" then return end
if (part.ClassName == "entity" or part.ClassName == "entity2") then
LocalPlayer().pac3_Scale = 1
LocalPlayer().pac_player_size = 1
hooks.NotifyShouldTransmit.pac_player_size(LocalPlayer(), true)
end
end)
end)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment