Why random spawning system don't work?
Hello, devs!
I was making trash system to a game. Don't know why it's not working. There are no errors on output. In script I was cloning Union and then changing position. Maybe union was the problem, but I don't know. Script is located in the model which has a part that size properties was used.
CODE:
1 | while wait(math.random( 1 , 3 )) do |
2 | local pos 1 = math.random(- 12 , 12 ) |
3 | local pos 2 = math.random(- 12 , 12 ) |
5 | local trash = game.ReplicatedStorage.Trash:Clone() |
6 | trash.Position = Vector 3. new(pos 1 , 10 , pos 2 ) |
8 | trash.Parent = game.Workspace |
ERRORS:
No erorrs