Hello, I want to make a certain person (userid or player name) bigger once they join, and make it so that it stays the same after he respawns
Heres my script (that doenst work for some reason)
Hello, I want to make a certain person (userid or player name) bigger once they join, and make it so that it stays the same after he respawns
Heres my script (that doenst work for some reason)
Changing body scale values on the client doesn’t work. Use a server script for this instead of a LocalScript.
would that work?
You could use avatar settings though! No scripting needed! But you must upload the game first.
i want it to change for a single person
Why are you using a while for loop…?
what else am i supposed to use? Is while bad or something?
Didn’t notice that! You must not use while do because you will lag suddenly because your body size multiplies by 2. Instead, use
game.Players.PlayerAdded:Connect(function(player)
if player.Name == "x" then
-- Size Script
end
end)
It’s really not ideal because it’s continuously running. Need a PlayerAdded
function and then handle their character in there.
I’ve managed to fix it myself
local function onCharacterAdded(character)
local hum = character.Humanoid
local hs = hum.HeadScale
local bds = hum.BodyDepthScale
local bws = hum.BodyWidthScale
local bhs = hum.BodyHeightScale
hs.Value = hs.Value * 2
bds.Value = bds.Value * 2
bws.Value = bws.Value * 2
bhs.Value = bhs.Value * 2
end
local function onPlayerAdded(player)
player.CharacterAdded:Connect(onCharacterAdded)
end
Players.PlayerAdded:Connect(onPlayerAdded)
make it a serverscript and place it in serverscriptservice (you need to add a check for the name)