I have a seat that when a players leaves the seat it should fire an event. but im getting this error: “player argument must be a Player object”
Here is the script:
Seat.ChildRemoved:Connect(function(child)
if child.Name == "SeatWeld" then
if Active == true then
Player = Players:GetPlayerFromCharacter(Seat.Occupant.Parent)
Active = false
pcall(function() NewGui:Destroy() end)
Player = nil
NewGui = nil
game.ReplicatedStorage.ComputerEvents.RemoveSit:FireClient(Player)
end
end
end)
Any help?