What im trying to do here is: I have multiple parts called "Block" in a folder named Obstacles inside Serverstorage. I want the Blocks to be cloned ON TOP of a Part so i made the coordinates. But nothing is happening. I dont know if this will help but what im trying to overall create is a game where the Player stands on a Part that increases Velocity over time and the Cloning blocks are supposed to be obstacles said player has to dodge to not be pushed to a Blackhole
while wait(math.random(10,20)) do
local a = -275.37
local b = -268.97
local function randcontinuous(a, b)
local x = game.ServerStorage.Obstacles.Block:Clone()
x.Anchored = false
x.Parent = workspace:WaitForChild("Space",24)
wait (24)
return a + math.random()*(b - a)
end
end

2 comments
If this helped, please upvote and select as answer. Thanks!
At what line would i have to put it?