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

OnEnter size help? [Not Solved]

Asked by 10 years ago

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)
0
Is 'leaf' a Part or a GUI? Perci1 4988 — 10y
0
Leaf is a part raystriker6707 30 — 10y

1 answer

Log in to vote
-1
Answered by 10 years ago

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)


0
>If this helped accept answer! User#5978 25 — 10y
0
There is still an error on that line. raystriker6707 30 — 10y
1
Maybe you should provide that error, then. BlueTaslem 18071 — 10y
1
I think the error may be you're giving only one argument for the math.random function. M39a9am3R 3210 — 10y
0
Oh yeah, forgot math.random(5,-10) User#5978 25 — 10y
Ad

Answer this question