Making a script that requires the name of the player who is sitting in a certain seat
COMMUNITY QUESTION
How to get a players name from a seat?
1 answer
you could check for the current player by using the seat's Occupant property, which holds the humanoid of the player that's sitting down:
Example: note: this only works when someone is sitting down on the seat; i recommend having some sort of event that detects when the seat is occupied
local seat = workspace.car.seat -- change this to directory of the desire seat object
local character = seat.Occupant.Parent
if character.Name == "bleh" then
print("hello there "..character.Name)
end
I really recommend checking out properties of roblox objects by going to Roblox API refrence. this will help you learn more on your own
This discussion is preserved as it was. New answers, comments, and votes are closed.

2 comments
When you sit on a VehicleSeat or Seat it creates "SeatWeld" within the seat, its Part1 property links to HumanoidRootPart of the player's character. SeatWeld.Part1.Parent.Name
this isnt a script request site, come with a script of your own that doesnt work as intended and then we'll help, the person below is not supposed to answer, instead do a little bit of research