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

Local Script Help?

I could use a local script to open and close guis, in which the gui would only open for the specific player of whom clicked it.. correct?

2 comments

0

Yup

0

yep..... local scripts are localized to one player

1 answer

✓ Accepted answer

Here's the script.

  1. Make a GUI and insert a Textbutton
  2. Change the text of Textbutton to "Open"
  3. Inside a Frame in the GUI together with the Textbutton.
  4. Make a script or localscript >IN< the Textbutton (it's better to make it script so that it would take small loading time)
local button = script.Parent --Remove local if it's in a localscript
Open = false

button.MouseButton1Down:connect(function()
	if Open == false then
		Frame.Visible = true
		Open = false
		button.Text = 'Close'
	elseif Open == true then
		Frame.Visible = false
		Open = true
		button.Text = 'Open'
	end
end)

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