I need assistance with scripting a way for a serverside script (the code below) to activate a local script to make it so that player in any seat of a given vehicle will not see other proximity prompts while driving or sitting in a passenger seat. Or any other way that is more efficient.
local proximityPromt = script.Parent local seat = proximityPromt.Parent seat:GetPropertyChangedSignal("Occupant"):Connect(function() if seat.Occupant then proximityPromt.Enabled = false -- possibly could add a proximitypromt.Localscript.Disabled = false? else proximityPromt.Enabled = true -- possibly could add a proximitypromt.Localscript.Disabled = true? end end) proximityPromt.Triggered:Connect(function(player) seat:Sit(player.Character.Humanoid) end)
Trying to decide the most efficient and optimized way to use a system for multiple different vehicles, players, and teams. To access the vehicle that they spawned in, not have somebody take it, not see the other prompts beside them to enter the said vehicle, and for it to have the option to exclude certain teams from accessing a vehicle that would be for example: “A normal officer cannot access a Federal Bureau of Investigation vehicle.”
Side note: I’m new to scripting so if the answer is obvious please tell me