When I get on the seat, it prints Humanoid, then when I jump off of it, it prints nil then Seat Occupied. How do I get it to print "Seat Occupied" when I sit on it?
seat.Changed:connect(function() print(seat.Occupant) if seat.Occupant == Humanoid then print("Seat Occupied") end end)
Hi Coos,
seat.Occupant.Name == "Humanoid"
then it would work, or seat.Occupant:IsA("Humanoid")
then it may work. Also, I'm not sure if you defined what Humanoid is above in the script. Hopefully you also defined seat.local seat = script.Parent; seat.Changed:Connect(function() print(seat.Occupant) if seat.Occupant:IsA("Humanoid") then print("Seat Occupied") end end)
Thanks,
Best regards,
~~ KingLoneCat