Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

How to make a coin spawn continuously even if a player touches it and gets destroyed?

Asked by 3 years ago

local coin = game.ServerStorage.coin local n = 0 local function f () local dup = coin:Clone() dup.Parent = game.Workspace local xPosition = math.random(-70 , 70) local zPosition = math.random(-70 , 70) dup.Position = Vector3.new(xPosition, -2, zPosition)

end

while n<5 do f() n = n+1 end

so i was trying to make this work but i can't figure out how to continuously spawn the coin.

0
I'd just set the parent to nil when you want it destroyed then set the parent to whatever it was before to add it back. Benbebop 1049 — 3y

Answer this question