Title is self explanatory, I am trying to get the player ID of whoever sits in this seat. I’m not sure where to even look for this, so could anyone help? This is what I have so far.
local Seat = script.Parent
script.Parent:GetPropertyChangedSignal(“Occupant”):connect(function()
local Humanoid = Seat.Occupant
if Humanoid then
local Player = game.Players:GetPlayerFromCharacter(Humanoid)
else
end
end)
not sure if you’re still accepting solutions but here you go
seat.Changed:Connect(function(property)
local id = nil
local players = game.Players:GetPlayers()
local playerName = seat.Occupant.Parent.Name
for i=1,table.getn(players) do
if players[i].Name == playerName then
id = players[i].UserId
break
end
end
print(id)
end)