Making a script that requires the name of the player who is sitting in a certain seat
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
Closed as Not Constructive by DeceptiveCaster
This question has been closed because it is not constructive to others or the asker. Most commonly, questions that are requests with no attempt from the asker to solve their problem will fall into this category.
Why was this question closed?