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

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

Asked by 10 years ago

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

2 answers

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

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.

0
well it is gonna make the button diappear...(destroy it) snoppyploptart 59 — 10y
0
So, I recommend putting it in the button so the script goes away as well. Reduces lag on your part. Shawnyg 4330 — 10y
Ad
Log in to vote
1
Answered by
Ekkoh 635 Moderation Voter
10 years ago

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
0
ok, they both target the button right? snoppyploptart 59 — 10y
0
Correct Ekkoh 635 — 10y

Answer this question