Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

How do I make it so that weapons in the workspace respawn at certain intervals?

I want to make it so that weapons that are in the workspace respawn, that way I don't have to bother messing around with rounds and complicated things like that. I think the script would have to be put into the weapons themselves, but I don't know. Could someone please help me with this?

1 answer

✓ Accepted answer

Off the top of my head, idk if it works, but it should:

local gear = {}
for i,v in pairs (workspace:GetChildren()) do
	if v:IsA("Tool") then
		gear[i] = v:clone()
		v.AncestryChanged:connect(function()
			Delay(30, function()  -- 30 = time until respawn
				gear[i]:clone().Parent = workspace
			end)
		end)
	end
end

If it doesn't, I know I made a free model for this at some point anyway :P

2 comments

0

Would this be a localscript? Or just a normal one?

0

A normal script. You can put it in ServerScriptService if you'd like to keep things going smoothly.

This discussion is preserved as it was. New answers, comments, and votes are closed.