Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

Disabling all proximity prompt when sitting?

Asked by
TechModel 118
3 years ago

I have a vehicle that has 4 seats, the problem is when I press e to sit, the other proximity prompt is visible while sitting and the other 3 prompts clutter, makes it messy. How will I do this to remove all proximity prompts when sitting locally or in a part? I've seen one of the DevForum topic but It was never solved.

local proximityPromt = script.Parent
local seat = proximityPromt.Parent

proximityPromt.ObjectText = seat.Name

seat:GetPropertyChangedSignal("Occupant"):Connect(function() 
 if seat.Occupant then
  proximityPromt.Enabled = false
 else
  proximityPromt.Enabled = true
 end
end)

proximityPromt.Triggered:Connect(function(player)
 seat:Sit(player.Character.Humanoid)
end)

1 answer

Log in to vote
0
Answered by 2 years ago

I think using a LocalScript and putting it into StarterPlayerScripts can fix it

Ad

Answer this question