I have made this script that checks if the player has the item equipped if it does it will destroy it and clone a the equipped one but if it dosent it will erase backpack and clone equipped one but i get an error when the remote function is activated how can I fix this? I have tried changing
local hasTool = game.Workspace[player][ItemName]
to wait for child but it still dosent work
Thanks For the help!
Error— ServerScriptService.EquipItemEvent:12: bad argument #2 to ‘?’ (string expected, got Object)
local char = player.Character
local hasTool = game.Workspace[char][ItemName]
if hasTool then
print("tool equipped")
else
print("No Equipped tool found")
end