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

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

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

4 answers

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.

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)

Where do I find GuiButton?

1 comment

0

First, insert a ScreenGui. Then, insert a TextButton.

function onClicked()
	script.Parent.Text = "Put your text here"
end

script.Parent.MouseButton1Click:connect(onClicked)

Insert that into a TextButton in a ScreenGui.

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