The tools are not working when you clone from replicated storage

I developed a lucky block system which functions partially well. When a player opens it, they are supposed to receive an item, but currently, the items are not functioning and although they are equipped, they do not display in the game. I tried to move items in serverstorage replicatedfirst but nothing seems to work.

local Tool = script.Parent
local gears = game.ReplicatedFirst.Plus70:GetChildren()
local rand = math.random(1, #gears)

local equipped = false

function onActivated()
	if not equipped then
		return
	end

	gears[rand]:Clone().Parent = Tool.Parent
	Tool:Destroy()
end

function onEquipped()
	equipped = true
end

function Unequipped()
	equipped = false
end

Tool.Activated:connect(onActivated)
Tool.Equipped:connect(onEquipped)
Tool.Unequipped:Connect(Unequipped)

does it work when you put the tool in starterpack?

Yes, It is working if I put it in starterpack

are there any error messages?

one thing i can think of is that when you call gears = game.ReplicatedFirst.Plus70:GetChildren(), ReplicatedFirst or Plus70 is not loaded in yet

so try waiting:

local ReplicatedFirst = game:GetService('ReplicatedFirst')
local gears = ReplicatedFirst:WaitForChild('Plus70'):GetChildren()

It did not help still the same issue

if this is a local script inside the lucky block then you will need to use a remote event to tell the server to move the tool into the player’s backpack