Hi!
I was wondering if you can use player.Character when holding a ProximityPrompt Or is there an other way to do this?
prompt.PromptButtonHoldBegan:Connect(function(promptObject, player)
if player.Character:FindFirstChild("Key") then
sound1:Play()
else
print("no key")
end
end)
The script will play a sound if you have the keys for the door you have to open. So I need to check if the player has them.

1 comment
Does the script not work or are you just wondering if theres another way to obtain the character? Otherwise just use .Triggered and remove promptObject