Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

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

Asked by 5 years ago

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

Log in to vote
0
Answered by 5 years ago

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

0
The humanoid sit property checks whether the person is in sit mode which can be accessed by humanoidstatetype enum 13 a other way Robloxian_Hero1234 14 — 5y
0
Yes but how do I get the player who pressed the gui's textbuttons humanoid? Skydoeskey 108 — 5y
0
So the player who pressed the textbutton. How can i check hes humanoid? Skydoeskey 108 — 5y
Ad

Answer this question