--LocalScript script.Parent.Touched:Connect(function() if script.Parent.Occupant then game.Players.LocalPlayer.Character.Humanoid.JumpPower=0 end end) --The LocalScript is inisde the VehicleSeat
I assume you're trying to disable jumping on the vehicle seat so that the player can't escape the vehicle they're using. This is simple. What you did wrong was you used the Player service to do it however the Occupant property of a Vehicle Seat is their humanoid. According to the article for the Vehicle Seat, it states that the Occupant property is "The humanoid that is sitting in the seat", so we can just use the occupant property from there.
local Seat = script.Parent --We create a variable for the seat. Seat.Touched:Connect(function() --Once a part touches the seat, it's probably the player. local Humanoid = Seat.Occupant --We get the humanoid of the person who is sitting on the seat. if Humanoid then --If the humanoid exists and not some other part we continue the code. Humanoid.JumpPower = 0 --We convert the humanoid's JumpPower property to zero so they can't press the space bar and escape the vehicle. end end)
game.Players.LocalPlayer.Character.Humanoid.JumpPower = 0
u need a space before and after the equal