im making a key to open door script and when i try to check if the player has the key then it returns nil everytime even tho he has the key.
here is my script
prompt.Triggered:Connect(function(player)
if Locked == true then
print(player)
print(player:FindFirstChild("Key1"))
if player:FindFirstChild("Key1") then
print(player)
Locked = false
prompt.ActionText = "Open"
prompt.ObjectText = ""
else
return
end
end
end)