Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

How Do I Detect If A Player Is In A Seat?

I am making a plane, I know there may be better ways, but I want to learn my own way and expand my creativity. What I'm trying to do is make the plane anchor when nobody is driving it, but when someone sits in the driver's seat it will unanchor allowing movement. I am very new to scripting, the most I can do is color changing and basic part movement!

1 answer

✓ Accepted answer

So you will need to do is detect the seat if it is seated using occupant put this script inside the plane seat

script.Parent.Changed:Connect(function() -- Detect the seat property changed
       if seat.Occupant  ~= nil then -- the seat is seated
              script.Parent.Anchored = true
       else
              script.Parent.Anchored = false 
       end
end)

2 comments

0

Thanks so much!

1

You welcome :D

This discussion is preserved as it was. New answers, comments, and votes are closed.