So, i've tried to make a script where when a player joins, a ball appears. Everything is going out well except that the size doesn't randomize.
game.Players.PlayerAdded:connect(function(player) local ball = Instance.new("Part", workspace.Lobby) ball.Shape = Enum.PartType.Ball ball.Color = Color3.new(math.random(), math.random(), math.random()) ball.Size = Vector3.new(math.random(7, 8, 9, 10), math.random(6, 7, 8, 9, 10), math.random(6, 7, 8, 9, 10)) ball.Position = Vector3.new(0.5, 0.5, -0.5) end)
what's the problem, the error says it has a wrong number of arrangements but i don't know what that means. How do i fix it?
I think the problem is that you have to many numbers for the size of the ball. Try using a local to define the random numbers like this:
local Y = math.random(1, 2, 3)
Then put:
Ball.Size = Y
Warning this is not the actual script I'm just pointing you in the right direction. Lemme know if this works