--Variables local seat = script.Parent local debounce = true local enabled = false --Script local function onTouch(Part) if debounce and Part.Parent:FindFirstChild("Humanoid") then if Part.Parent.Humanoid.Sit == true then debounce = false print(Part.Parent, "is sitting") wait(0.1) debounce = true end end end seat.Touched:Connect(onTouch)
Can someone explain why if Part.Parent.Humanoid.Sit == true then
doesn't work?
The property probably is set after u check the value. I better option would to use GetPropertyChangedSignal and check for when the seat's Occupant changes.
Seat:GetPropertyChangedSignal('Occupant'):Connect(function() -- ok end)