Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local powerups = game.ServerStorage.Powerups:GetChildren()
- local timer = 7
- local y = 3.5
- function spawnPowerup(number)
- local powerup = powerups[number]
- local rangeX = math.random(-60, 36)
- local rangeZ = math.random(-137.5, -41.5)
- local spawnedPowerup = powerup:Clone()
- spawnedPowerup.Parent = game.Workspace
- spawnedPowerup.Position = Vector3.new(rangeX, y, rangeZ)
- end
- while true do
- local number = math.random(1,#powerups)
- spawnPowerup(number)
- wait(timer)
- end
Advertisement
Add Comment
Please, Sign In to add comment