How to allow players using tools on vehicle seat and seat?

How would I allow the player to use tools when the player is sitting on a vehicle seat and how to allow a player to use tools when they are sitting on a regular seat?

Fire a function in the seat to check for a change in the Seat.Occupant Properties to tell when a player sits in it.
Occupant.Parent.Name will tell you the name of the player sitting there.
Allow that player to use the tool.

2 Likes

But how would I allow the user to use the tool that is my question?

1 Like

use CharacterAdded event to detect when a player’s character is added and then allow tool usage. For regular seats, I would recommend using the OccupantChanged event to detect when a player sits in or leaves the seat, and then enable or disable tool usage accordingly.

1 Like

Make the tool have a BoolValue in it and script the Enabled property true or false. This keeps it from being used when you don’t want them to be able to equip it.

2 Likes

Yeah but somehow it deactivates the Inventory how could I enable that?