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?

print("Function starting....")
Vinny = script.Parent

Vinny.BackgroundTransparency = 1
    wait (0.1)

print("Function ending....")

script: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.

print("Function starting....")
Vinny = script.Parent

wait(0.1) -- It should be here (Before making the Gui transparent)
Vinny.BackgroundTransparency = 1
-- Not here (Not after making the Gui transparent)

print("Function ending....")

script: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