For the script I have it so when a player touched the part they get the tools, but that’s not the issue, how do I detect if they have the tools in there Backpack so I can check if they do and if they do don’t clone the tools
one thing that will help is not only seeing if it’s in the backpack but also if it’s in the character which would go something like this:
local toolclone = game.ReplicatedStorage.tool:Clone()
local toolname = game.ReplicatedStorage.tool.Name
local part = workspace.part
part.Touched:Connect(function(player)
if not player.Backpack:FindFirstChild(toolname) then
toolclone.Parent = player.Backpack
else
print(player.Name…" already has "…toolname)
end
end)
3 Likes
ok thanks, ill try that, seems like it should work
Make sure to also check the player’s character model in workspace, so if they’re holding it it will also be detected.
1 Like