I was wondering, when I use proximityPromptservice.PromptTriggered on the client, do I have to check if playerWhoTriggered == player? This probably doesn’t matter but I’m just curious.
local ProximityPromptService = game:GetService("ProximityPromptService")
local player = game.Players.LocalPlayer
ProximityPromptService.PromptTriggered:Connect(function(prompt, playerWhoTriggered)
if playerWhoTriggered == player then
end
end)
When a player activates a proximity prompt, the information doesn’t get sent to other players (only to the server). Subsequently, playerWhoTriggered will always be the local player, when the code is a local script. This means that you don’t need to check if playerWhoTriggered == player