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

How do you make a GUI so I can tell players things when they click it?

Asked by 9 years ago

Please help me with this. I am very un-experienced. Thanks!

4 answers

Log in to vote
0
Answered by 9 years ago

Make a GuiButton and put a local script in it like this.

script.Parent.MouseButton1Click:connect(function() --access the button, then the clicked event, then connect it with an anonymous function.
    --do stuff here whenever the button is clicked
end)

Studying events in the wiki would help you figure other things like this out. That's how one becomes a great scripter.

Ad
Log in to vote
0
Answered by
Shawnyg 4330 Trusted Badge of Merit Snack Break Moderation Voter Community Moderator
9 years ago

Well I gave you the firing event. Just put in your code.

--Local Script
plr = game.Players.LocalPlayer
sp = script.Parent
sp.MouseButton1Down:connect(function()
    -- Your code here
end)
Log in to vote
0
Answered by 9 years ago

Where do I find GuiButton?

0
First, insert a ScreenGui. Then, insert a TextButton. Shawnyg 4330 — 9y
Log in to vote
0
Answered by 9 years ago
function onClicked()
    script.Parent.Text = "Put your text here"
end

script.Parent.MouseButton1Click:connect(onClicked)

Insert that into a TextButton in a ScreenGui.

Answer this question