Hello! I’ve been trying to make a proximity prompt that gives players a tool however it doesn’t work once players resets as it gives me this error:
Is there any to fix this?
Script below:
local rs = game:GetService("ReplicatedStorage") -- ReplicatedStorage
local tool = rs:FindFirstChild("Lamp"):Clone() -- Tool
local prox = script.Parent -- Proximity Prompt
prox.Triggered:Connect(function(player)
tool.Parent = player.Backpack -- When Proximity Prompt is triggered it gives player a lamp
end)
Thanks in advance!