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

replicated storage deletes copies of items?

Asked by 2 years ago

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
0
you don't clone the lantern, you just reparent the one in replicated storage. the8bitdude11 358 — 2y

Answer this question