Is this from a local script or a server script. I don’t believe filtering enabled would affect this. If you mean that the server cannot see this tool, you could just use a remote event to tell the server to give them a tool.
Oh, thank you! It was just something I thought I’d need to specify.
I’m curious though, does using player[“Backpack”] not act as FindFirstChild anymore? I used to use [“”] all the time when referring to the child of something.
It’s a ServerScript I believe I was just a little confused, thanks for checking though!
Now when the player clicks “Eggs” they’ve given a tool called Eggs but I’d like to make it so when they click “Bowl” the tool “Eggs” is removed from Backpack… This was my attempt-
clickDetector = script.Parent[“ClickDetector”]
function onMouseClick(player)
local pb = player:FindFirstChild(“Backpack”)
local item = pb:FindFirstChild(“Eggs”)
item:remove()
end
clickDetector = script.Parent[“ClickDetector”]
function onMouseClick(player)
print("Clicked")
local pb = player:FindFirstChild(“Backpack”)
local item = pb:FindFirstChild(“Eggs”)
if item then
item:Destroy()
end
end
clickDetector.MouseClick:Connect(onMouseClick)