Hi guys! It’s a really quick question which I can’t quite figure out. How do I find out when a player sits in the seat and then what the player’s name is from them triggering some sort of function from sitting in the seat.
Either by tracking the Seat’s .Occupant, or the Humanoid’s .SeatPart.
The method for both which you’d want to use and connect to would be :GetPropertyChangedSignal(PropertyName)
.
script.Parent:GetPropertyChangedSignal("Occupant"):Connect(function(Person)
print(Person)
end)
I’ve done this but it keeps returning to nil when I sit in the seat?
The event doesn’t provide any parameters. So you’ll need to manually check by doing script.Parent.Occupant.
1 Like