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

Code running on it's own? An auto run issue in the startergui and workspace?

Asked by 8 years ago

Instead of waiting to be placed in the player's GUI, it runs on it's own in starter GUI. Am I forgetting something?

1print("Function starting....")
2Vinny = script.Parent
3 
4Vinny.BackgroundTransparency = 1
5    wait (0.1)
6 
7print("Function ending....")
8 
9script:Destroy()
0
Everything from StarterGui is automatically cloned to the player's gui. GoldenPhysics 474 — 8y

1 answer

Log in to vote
1
Answered by 8 years ago

It looks like you've misplaced the wait() there.

01print("Function starting....")
02Vinny = script.Parent
03 
04wait(0.1) -- It should be here (Before making the Gui transparent)
05Vinny.BackgroundTransparency = 1
06-- Not here (Not after making the Gui transparent)
07 
08print("Function ending....")
09 
10script:Destroy()

Self-explanatory.

0
wat User#11440 120 — 8y
0
That is not really my issue. My issue is that it is running before it goes into the player GUI. Since I leave it in a brick in the workspace, or in starter GUI. It still runs on it's own. BrotherBerzerk 17 — 8y
0
Scripts don't run in the StarterGui. User#11440 120 — 8y
Ad

Answer this question