am trying to make a stand that gives lanterns.

but the lantern disappears when anyone grabs it so I am making a work around by putting it in replicated storage and copying it so that there is still a lantern for the next time one is grabbed!

but when I run the game. one lantern respawns but the copy is not there ( I don't even know if it copies)

error is on line 16

--- THIS IS THE RSS, HANDS UP (aperiently any three letters together sounds like a goverment agency name)
local RSS = game:GetService("ReplicatedStorage")

---repaeat
while true do
	
	---wait for random time
	wait(1)
	
	---check if lantern does not exist in workspace
	local existance = game.Workspace.south_side:WaitForChild("Lantern", 1)--math.random(1, 100))
	if not existance then
		
		---copy lantern
		local lantern_copy = RSS.Lantern
		RSS.Lantern.Parent = RSS
		
		---move one of lanterns to workspace
		RSS.Lantern.Parent = game.Workspace
	else
		
	end
end

1 comment

0

you don't clone the lantern, you just reparent the one in replicated storage.