Last active
July 2, 2020 19:44
-
-
Save Cynosphere/d6c720fde67d212a4341117bfe6e189f to your computer and use it in GitHub Desktop.
PAC3 Player Hull Fix Workaround
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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