I have an image button that makes the player smaller when clicked.
It works fine in Studio when I test it, but when I upload it to Roblox and play it, it doesn't work.
function onClick()
local h = game.Players.LocalPlayer.Character:findFirstChild("Humanoid")
if h~=nil then
h:findFirstChild("BodyHeightScale").Value= .7
h:findFirstChild("BodyWidthScale").Value= .7
h:findFirstChild("HeadScale").Value= .7
h:findFirstChild("BodyDepthScale").Value= .7 end
end
script.Parent.MouseButton1Click:connect(onClick)
Any ideas on how to make it work when the game is online? Please be descriptive, it really helps a lot! Thanks
EDIT: I'd like to add that this script above is located here:
Workspace>GUIscript>ScreenGUI>ImageButton>Script <------

2 comments
Wow, thank you for all the info! I understand what's going on now. This really really helped and thanks for the explanation!
You're welcome!