I want to reference the player but I don’t the foggiest idea how to.
Uhh… try using Seat.Occupant
Example:
lcoal seat = workspace -- Seat goes here
local troll = game.Players:GetPlayerFromCharacter(seat.Occupant.Parent)
You’ll have to detect every time the Seat’s Occupant gets changed using the GetPropertyChangedSignal
event, so that you can detect who’s currently sitting in the seat
local Seat = workspace.Seat
Seat:GetPropertyChangedSignal("Occupant"):Connect(function()
local Player = game.Players:GetPlayerFromCharacter(Seat.Occupant.Parent)
if Player then
print("Found a player!")
else
print("The current player who sat on a seat left it!")
end
end)
1 Like