#Respawn fonctions
1 messages · Page 1 of 1 (latest)
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
uhh
Ik i just made the script so that it disappear once but idk how to make it spawn again but randomly
.Touched is an event, not a boolean
so just remove the "if" and the "end" at the end
On a certain pos of an area(part)
all that code runs once, you can put it inside a loop
for example
while true do -- really bad
task.wait(3)
local coin = Coin:Clone()
coin.Touched ...
end
It will respawn on the same place is it right ?
yeah