Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

OnEnter size help? [Not Solved]

I am trying to make it so that also when you join the size of the part goes up.

local leaf = script.Parent -- 'leaf' is a part

game.Players.PlayerAdded:connect(function()
	leaf.Size = math.random(5-10), 1, math.random(5-7) -- error on this line
end)

2 comments

0

Is 'leaf' a Part or a GUI?

0

Leaf is a part

1 answer

You forgot Vector3

local leaf = script.Parent

game.Players.PlayerAdded:connect(function()
    leaf.Size = Vector3.new(math.random(5-10), 1, math.random(5-7) )-- error on this line
end)


5 comments

0

If this helped accept answer!

0

There is still an error on that line.

1

Maybe you should provide that error, then.

1

I think the error may be you're giving only one argument for the math.random function.

0

Oh yeah, forgot math.random(5,-10)

This discussion is preserved as it was. New answers, comments, and votes are closed.