Ok so, my script doesn't seem to be working. I'd like it so that the script would randomly pick a model and spawn it onto a specific block but its not working at all.. :/
Heres my script:
--By TYMZ4ACTION
RespawnTime = 5
function spawn()
math.randomseed(tick)
--This makes sure the spawning is completely random.
tools = game.ServerStorage.Folder:GetChildren()
-- This function creates a table containing all your tools.
clone = tools[math.random(1,#tools)]:Clone()
-- This picks a random tool out of the possibilities.
clone.Position = script.Parent.Position
-- This makes sure it spawns in the same position as the spawn block...
clone.Parent = script.Parent
-- ... And this places it into your world
clone.Name = "Pickup"
clone.AncestryChanged:connect(function() wait(RespawnTime) spawn())
end
Any help will be greatly appreciated! :) -TYMZ4ACTION
