Okay ik this sounds silly. But I'm trying to make a bench. The bench has 4 seats. And I've made a gui that tells the player to press E to sit down on the bench. The problem is that the gui keeps staying up when the player is seated. So what I want is for the game to detect that I've sat down on one of the four seats and once the game detects that I've sat down I want the game to run this script "script.Parent.Parent.Visible = false" By the way. The script to execute this has to be in the same folder as the "script.Parent.Parent.Visible = false" script is in. Ik this question might be hard to understand but if you have any problems understanding then please comment and I'll try to explain better.
COMMUNITY QUESTION
How do i make a script to detect if i have sit down in a seat?
1 answer
if humanoid.Sit == true then gui.Visible = false end
This discussion is preserved as it was. New answers, comments, and votes are closed.

5 comments
The humanoid sit property checks whether the person is in sit mode which can be accessed by humanoidstatetype enum 13 a other way
Yes but how do I get the player who pressed the gui's textbuttons humanoid?
https://www.lua.org/pil/1.html
So the player who pressed the textbutton. How can i check hes humanoid?
https://developer.roblox.com/api-reference/class/Humanoid