Still have questions? Join our Discord server and get real time help.
Log in to vote

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

Asked by 18 days 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 =, -2, zPosition)


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.

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 641 — 18d

Answer this question