when you click the button (gui) it makes you small
function onButtonClicked() local Character = game.Players.LocalPlayer local Humanoid = Character:FindFirstChild('Humanoid')
if Humanoid then local HEAD = Humanoid:FindFirstChild('HeadScale') local BodyWidthScale = Humanoid:FindFirstChild('BodyWidthScale') local BodyHeightScale = Humanoid:FindFirstChild('BodyHeightScale') local BodyDepthScale = Humanoid:FindFirstChild('BodyDepthScale') if HEAD then HEAD.Value = HEAD.Value - 0.7 BodyDepthScale.Value = BodyDepthScale.Value - 0.7 BodyHeightScale.Value = BodyHeightScale.Value - 0.7 BodyWidthScale.Value = BodyWidthScale.Value - 0.7 end end end
script.Parent.MouseButton1Click:connect(onButtonClicked)
' local Character = game.Players.LocalPlayer ' on that, 'player' is not found
I can't tell you whats wrong because you didn't post the whole script
MAKE SURE ITS IN A LOCALSCRIPT!!! THE SCRIPT WITH A HUMAN ON IT!!!
short and simple script :
script.Parent.MouseButton1Click:connect(function() local Humanoid = game.Players.LocalPlayer.Character:FindFirstChild('Humanoid') Humanoid.HeadScale.Value = Humanoid.HeadScale.Value - 0.7 Humanoid.BodyDepthScale.Value = Humanoid.BodyDepthScale.Value - 0.7 Humanoid.BodyHeightScale.Value = Humanoid.BodyHeightScale.Value - 0.7 Humanoid.BodyWidthScale.Value = Humanoid.BodyWidthScale.Value - 0.7 end)
Longer script :
script.Parent.MouseButton1Click:connect(function() local Humanoid = game.Players.LocalPlayer.Character:FindFirstChild('Humanoid') if Humanoid then local HEAD = Humanoid:FindFirstChild('HeadScale') local BodyWidthScale = Humanoid:FindFirstChild('BodyWidthScale') local BodyHeightScale = Humanoid:FindFirstChild('BodyHeightScale') local BodyDepthScale = Humanoid:FindFirstChild('BodyDepthScale') if HEAD then HEAD.Value = HEAD.Value - 0.7 BodyDepthScale.Value = BodyDepthScale.Value - 0.7 BodyHeightScale.Value = BodyHeightScale.Value - 0.7 BodyWidthScale.Value = BodyWidthScale.Value - 0.7 end end end)