#Respawn fonctions

1 messages · Page 1 of 1 (latest)

forest timber
#

Yo how can i make that script so in a certain area, my spheres spawn randomly and then disappear ?

#

local CoinZone = game.Workspace.Prehistory.TimeZone
local Coin = script.Parent

print("found the ball")

wait(3)

Coin:Clone(Coin)


game.Debris:AddItem(Coin, 10)

if Coin.Touched:Connect(function(hit)
        if hit.Parent:FindFirstChild("Humanoid") then
            local player = game.Players:GetPlayerFromCharacter(hit.Parent)
            if player then
                player.leaderstats.Time.Value = player.leaderstats.Time.Value + 10
                print("got the ball")
                Coin:Destroy()
            end
        end
    end) then
end

forest timber
#

Ik i just made the script so that it disappear once but idk how to make it spawn again but randomly

bronze otter
#

.Touched is an event, not a boolean
so just remove the "if" and the "end" at the end

forest timber
bronze otter
forest timber
bronze otter
#

yeah