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

How do i make a script to detect if i have sit down in a seat?

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.

1 answer

if humanoid.Sit == true then gui.Visible = false end

5 comments

0

The humanoid sit property checks whether the person is in sit mode which can be accessed by humanoidstatetype enum 13 a other way

0

Yes but how do I get the player who pressed the gui's textbuttons humanoid?

0

So the player who pressed the textbutton. How can i check hes humanoid?

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