Ship not spawning after a while? [SOLVED]
Asked by
7 years ago Edited 7 years ago
In games it breaks after a while I have no idea why. Is there a better way of spawning things in? - thanks
08 | script.Parent.Touched:connect( function (hit) |
09 | if debounce = = true then |
11 | local hum = hit.Parent:FindFirstChild( "Humanoid" ) |
13 | local player = game.Players:GetPlayerFromCharacter(hit.Parent) |
14 | local treasure = player.leaderstats.Treasure |
15 | if treasure.Value = = 0 or treasure.Value > 0 then |
16 | treasure.Value = treasure.Value - 0 |
17 | local ship 1 = game.ReplicatedStorage.Ship 1 :Clone() |
18 | ship 1. Parent = Workspace |
I solved it by respawning the spawners every 120 seconds incase they broke if anyone has this problem in the future.