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

How do I make a tutorial gui wait for a player to do something?

Asked by 2 years ago

I am making an in-game tutorial and I have most of it dont, but I am having trouble with one thing…

The tutorial tells the player to click the “edit” button and the GUI stays there without a continue button until the player clicks the right button and until the player clicks the right button all the other buttons are disabled.

However, whenever I try it doesn’t work and I can’t find any help of YouTube or anywhere else.

I tried using a MouseButton1Click:Connect() function inside of the same script for the specific tutorial line and connected it to the edit button, but it won’t work

Can someone please help me or direct me to something that can… I have tried everything I could think of

0
im guessing ur putting something above the button to click Pitched_mobile 191 — 2y
0
if you put like by example a Frame above the button (invisible or not) it will not detect you clicking it Pitched_mobile 191 — 2y
0
I didn’t put anything over it DiOrOmG2 0 — 2y

2 answers

Log in to vote
0
Answered by 2 years ago

A very useful feature with events is you can wait until they are fired.

EditButton.MouseButton1Click:Wait()

This line of code will wait until the edit button has a mouse button click, from there you can do as you wish.

0
Ohh ok thank you so much DiOrOmG2 0 — 2y
0
Do I put the function under the wait? DiOrOmG2 0 — 2y
0
Yes you would virushunter9 943 — 2y
0
It didn’t work.. I did edit.MouseButton1Click:Wait() and what I want it to do under DiOrOmG2 0 — 2y
0
I did edit.MouseButton1Click:Wait() continue4.Visible = true tutorial:TweenPosition(UDim2.new(0.013, 0,0.254, 0), "Out", "Linear", 1, false) edit.Enabled = true DiOrOmG2 0 — 2y
Ad
Log in to vote
0
Answered by 2 years ago
edit.MouseButton1Click:Wait()
        continue4.Visible = true
        tutorial:TweenPosition(UDim2.new(0.013,0,0.254,0), "Out", "Linear", 1, true)
        edit.Enabled = true
--this is my script that won't work

Answer this question