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.
But how would I allow the user to use the tool that is my question?
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.
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.
Yeah but somehow it deactivates the Inventory how could I enable that?