✓ Accepted answer
Hi Coos,
It doesn't print "Seat Occupied" because the Occupant is an object property. So, if Humanoid is a variable that is set to the string "Humanoid" then, it won't print because the Occupant is actually an object. If you however check 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.
####So, it would look something like this:
local seat = script.Parent;
seat.Changed:Connect(function()
print(seat.Occupant)
if seat.Occupant:IsA("Humanoid") then
print("Seat Occupied")
end
end)
##Hope i helped and have a wonderful day/night.
Thanks,
Best regards,
~~ KingLoneCat
2 comments
What is Humanoid defined as?
When I sit in the seat, the value of Occupant is "Humanoid"