while true do wait(0.25) local pos1 = math.random(-163.245,163.245) local pos2 = math.random(-163.245,163.245) local coin = game.ServerStorage.Coin:Clone(game, workspace) coin.Position = Vector3.new(pos1, 21, pos2) end?
I've been trying to spawn in coins at random position why wont this work?
here is the error in output "ServerScriptService.Script:10: unexpected symbol near '?"
Try this:
while true do wait(0.25) local pos1 = math.random(-163.245,163.245) local pos2 = math.random(-163.245,163.245) local coin = game.ServerStorage.Coin:Clone() coin.Parent = game.Workspace coin.Position = Vector3.new(pos1, 21, pos2) end
you put "Coin:Clone(game,workspace)" (you put a ',' instead of a '.') and since I am unsure of the arguements for that function , I just set the parent with coin.Parent. Edit: Sorry I didn't see that someone else already answered it :/
You added a ?
at the end on line 10 remove it and Clone doens't have variables you have to manualy parent it.