01 | local Plr = game:GetService( "Players" ) |
02 | local LocalPlr = Plr.LocalPlayer |
03 | local Humanoid = LocalPlr.Character or LocalPlr.CharacterAdded:Wait() |
04 | repeat wait() until Humanoid:FindFirstChild( "Humanoid" ) |
05 |
06 | local BodyDepthScale = Humanoid:WaitForChild( "BodyDepthScale" ) |
07 | local BodyWidthScale = Humanoid:WaitForChild( "BodyWidthScale" ) |
08 | local Properties = { "BodyDepthScale" , "BodyWidthScale" } |
09 |
10 | local Scale = 1 |
11 |
12 | for _, v in pairs (Properties) do |
13 | Humanoid [ v ] .Value = Humanoid [ v ] .Value + Scale |
14 | end |
It is a local script located in StarterPlrCharacterScripts
Put this script into ServerScriptService the explanation is inside the code as you can see.
01 | local multiplier = 2 -- the multiplier is 2 so the body will grow 2x |
02 |
03 | game.Players.PlayerAdded:Connect( function (plr) -- when player joins |
04 | plr.CharacterAdded:Connect( function (char) -- when a character gets added |
05 | local hum = char:WaitForChild( "Humanoid" ) -- gets humanoid of new character |
06 | hum.BodyHeightScale.Value = multiplier -- changes height |
07 | hum.BodyWidthScale.Value = multiplier -- changes width |
08 | hum.BodyDepthScale.Value = multiplier -- changes depth |
09 | hum.HeadScale.Value = multiplier -- changes headsize |
10 | hum.WalkSpeed = multiplier* 16 -- changes walkspeed accordingly |
11 | hum.JumpPower = multiplier* 50 -- changes jumppower accordingly |
12 | -- feel free to remove any stuff like depth and width and head to make the person only grow and stuff |
13 | -- you can also do like 2*multiplier to make it grow even 2x the multiplier on some values |
14 | end ) |
15 | end ) |
Hi, You would make a function my friend. It should be something like this:
function playerJoin()
--Code here, also code that changes player size
end
game.Players.PlayerAdded:Connect(playerJoin) -- Connect the function with an event called on playeradded.
This would run every time a player joins and also if this is a local script only the player can see it and no one else can. You can also double check if the functions runs by typing in print statement called print("A player has joined"). It should print in the output window that a player has joined.