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

Why isn't this script working in StarterPlayerScripts even when working in StarterCharacterScripts?

Asked by
alibix123 175
8 years ago
playerGui = game.Players.LocalPlayer.PlayerGui

for i=0,1,0.1 do
    wait()
    playerGui:WaitForChild('ScreenGui').Frame.BackgroundTransparency = i
end

The script should a GUI frame from opaque to transparent. The thing is that this script for some reason works in StarterCharacterScripts but not StarterPlayerScripts. There is no error message, no nothing and it's driving me crazy.

0
I put scripts like this in StarterPack, or maybe ReplicatedFirst. There are a lot a places you could put a script like this though. If it doesn't work, put the script where it does work :P User#11440 120 — 8y
1
Scripts in StarterPlayerScripts only run once. Scripts in StarterCharacterScripts run each time the character respawns. Uglypoe 557 — 8y
0
^Didn't know that =3 User#11440 120 — 8y
1
Just to add to Uglypoe comment the script is copied into the player character then run so you do not need to wait for the character loading. User#5423 17 — 8y

1 answer

Log in to vote
1
Answered by 8 years ago

" Scripts in StarterPlayerScripts only run once. Scripts in StarterCharacterScripts run each time the character respawns." - @Uglypoe

That is your problem.

Ad

Answer this question