Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

How would I go abut making a script to make players bigger as soon as they spawn in?

Asked by 6 years ago

I am making a place for a group that I'm in, but the scale is a bit too big. I want to make a script that will resize players as soon as they spawn in.

1 answer

Log in to vote
0
Answered by
mattscy 3725 Moderation Voter Community Moderator
6 years ago

If you are using R15, you could try something like this:

--Set these variables:
local depthScale = 1
local heightScale = 1
local widthScale = 1
local headScale = 1

game.Players.PlayerAdded:Connect(function(plr)
    plr.CharacterAdded:Connect(function(char)
        local hum = char:WaitForChild("Humanoid")

        local bd = Instance.new("NumberValue")
        bd.Value = depthScale
        bd.Name = "BodyDepthScale"
        bd.Parent = hum

        local bh = Instance.new("NumberValue")
        bh.Value = heightScale
        bh.Name = "BodyHeightScale"
        bh.Parent = hum

        local bw = Instance.new("NumberValue")
        bw.Value = widthScale
        bw.Name = "BodyWidthScale"
        bw.Parent = hum

        local hs = Instance.new("NumberValue")
        hs.Value = headScale
        hs.Name = "HeadScale"
        hs.Parent = hum
    end)
end)

You can look into how these work here.

Ad

Answer this question