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

How to make a object spawner?

Asked by 5 years ago

i want to make a spawner for each position (spawns) i mean 46 position, and i have 16 items (hoarditems) all i used didn't work , so who can help me?

local spawns = workspace:WaitForChild("HoardSpawn"):GetChildren()[math.random(#workspace:WaitForChild("HoardSpawn"):GetChildren())]
local hoarditems = workspace["Spawns(Unioned)"]:GetChildren()[math.random(#workspace["Spawns(Unioned)"]:GetChildren())]

local times = 20
local easy = true

while wait(2) do
    hoarditems.CFrame = spawns.CFrame
end

1 answer

Log in to vote
0
Answered by 5 years ago
Edited 5 years ago

Ok, so you shouldn't really make it too complex, instead of that, why not make a spawner with clones. You can put the item you want to spawn into the location you want, after you figure that out, put the that item into ReplicatedStorage or any other space and insert this script into Workspace

while true do
game.ReplicatedStorage.PARTNAME:Clone().Parent  
= game.Workspace
wait(2)
end
Ad

Answer this question