I’m trying to check if theirs a key card in the players backpack when they touch the door but it only works if they have it equipped.
local Players = game:GetService("Players")
local TouchPart = script.Parent
TouchPart.Touched:Connect(function(touched)
if touched.Parent:IsA("Model") and touched.Parent:FindFirstChild("Humanoid") then
local Player = Players:GetPlayerFromCharacter(touched.Parent)
if Player.Character["Key Card"] or Player.Backpack["Key Card"] then
print("Key card found")
end
end
end)