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

On a GUI, do i put the local script in the gui or frame or text button?

game^StarterGui^ScreenGui^Frame^Textbutton - where here do i put it?

2 answers

✓ Accepted answer

You can put it in either the Frame or the Textbutton. If it's a button script, I recommend you put it in the TextButton, so it's a bit organized.

2 comments

0

well it is gonna make the button diappear...(destroy it)

0

So, I recommend putting it in the button so the script goes away as well. Reduces lag on your part.

It's all a personal preference as long as the LocalScript is a descendant of StarterGui. Just remember you may have to change some things in the script depending on where you place it, i.e.

local Button = script.Parent -- Inside the TextButton
local Button = script.Parent.TextButton -- Inside the Frame

2 comments

0

ok, they both target the button right?

0

Correct

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