The error states that plr must be an object, even though when I print out the player before firing, it says my username. Why is this happening and how can I fix this? P.S. The if statement is inside of a modulescript function and fires every 1 second in a while true do loop.
if seat:FindFirstChild("SeatWeld") and seat.SeatWeld.Part1.Parent.ClassName == "Model" then
plr = game.Players:GetPlayerFromCharacter(seat.SeatWeld.Part1.Parent)
print(plr)
Sitting = true
SitEvent:FireClient(plr,Sitting,seat) -- here
else
Sitting = nil
SitEvent:FireClient(plr,Sitting,seat)
end

4 comments
What line are you getting the issue on?
On line 3, try print(type(plr)) and let me know what it prints.
The script may be jumping to "else," and based on this code, you never provided a definition for 'plr' in this if statement route. I would need to see more context in order to make this an accurate judgement. Does it actually error on line 5?
^