Hello, I have been using this tutorial (my code isn't a complete copy bc of what I need in my game) but my code so far isn't working, here is what I have done so far:
local frame = script.Parent local grow = frame.grow local shrink = frame.shrink local size = 1 local player = game.Players.LocalPlayer grow.MouseButton1Click:Connect (function() player.Character.Humanoid.HeadScale.Value = size player.Character.Humanoid.BodyWidthScale.Value = size player.Character.Humanoid.BodyHeightScale.Value = size player.Character.Humanoid.BodyDepthScale.Value = size end)
If you do this in LocalScript
, changes won't be seen on anyone else's screen except yours, to fix this you can use remote events, these are instances that let you send messages to Roblox server to show something to everybody:
local frame = script.Parent local grow = frame.grow local shrink = frame.shrink local size = 1 local resizeCharacter = game.ReplicatedStorage.ResizeCharacter grow.MouseButton1Click:Connect(function() -- Send signal to server with "size" value -- Note that exploiters can put any value here so for security reasons -- it's good to save values on server and only send "codes" where -- each code corresponds to its value or just prevent the value -- from being bigger or lower than some value on server resizeCharacter:FireServer(size) end)
-- You can create this remote event in studio, but kirda can't local resizeCharacter = Instance.new("RemoteEvent") resizeCharacter.Name = "ResizeCharacter" resizeCharacter.Parent = game.ReplicatedStorage -- When some noob sends signal though remote event, this function executes resizeCharacter.OnServerEvent:Connect(function(player, size) -- Simple exploiter protection, if someone tries to resize himself -- to something bigger than 10 or smaller than 0 it's possible -- that he is cheater, if you want to do that intentionally, you should -- change these magic numbers if size > 10 or size < 0 then return end player.Character.Humanoid.HeadScale.Value = size player.Character.Humanoid.BodyWidthScale.Value = size player.Character.Humanoid.BodyHeightScale.Value = size player.Character.Humanoid.BodyDepthScale.Value = size end)