0

# Why does this tool disappear when I playtest and try to clone?

Edited 15 days ago

Hi, So I am making a simulator. I'm trying to make it as original as I can, but the problem is with my shop. The functions it is meant to have is that it clones a tool from ReplicatedStorage into the players backpack, but when I playtest it in studio wherever I put it, it gets hidden and in the output, it says it's not a valid member of ReplicatedStorage. I don't know what to do, I have looked at tutorials and followed their scripts but the tool always gets deleted. Here is my cloning script if you need it.

local player = game.Players.LocalPlayer

script.Parent.MouseButton1Click:Connect(function()
local tool = script.Tool:Clone()
tool.Parent = player.Backpack
end)


That is in a LocalScript in StarterGUI. I haven't really done cloning before so I'm new to this. Any help appreciated!

0
local player = game.Players.LocalPlayer