Hello, is there a way to put a script inside a seat to know when someone sits in it? I do not need to know who sits in the seat, but just I would like it to call a function when the seat was sat in.
Edited with better code sample: Make sure this is a localscript inside startercharacterscripts
local character = script.Parent local humanoid = character:WaitForChild("Humanoid") local mostRecentSeat = nil --the most recent seat that the player sat in humanoid.Seated:Connect(function(isSeated, seat) if isSeated then if seat then print ("The player is now sitting in the seat named "..seat.Name.."!") mostRecentSeat = seat end else print("The player is no longer sitting in "..mostRecentSeat) end end)