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

I need help on my script to fix the repeating of the intro gui. Does anyone have a fix?

Asked by 4 years ago

I was working on the script until i noticed when I reset my character the intro repeats itself, i even tried destroying the script that was running the intro gui, but it still repeated. Can anyone help me on my problem the code is listed down below.



local PlayerGui = game.Players.LocalPlayer:WaitForChild("PlayerGui") PlayerGui:SetTopbarTransparency(0) local GUI = script.LoadingScreen GUI.Frame.Visible = true GUI.Frame.TextLabel.ZIndex = 2 GUI.Parent = PlayerGui wait(2.5) GUI.Frame.TextLabel.Text = "From the works of jkiop23 and NervousKrystof" wait(2.5) GUI.Frame.TextLabel.Text = "jkiop23 presents" wait(2.5) GUI.Frame.TextLabel.TextColor3 = Color3.fromRGB(85,0,127) GUI.Frame.TextLabel.Text = "Fredbear and Friends Family Dinner" wait(0.1) local frame= GUI.Frame --the frame you added wait (2) for loop = 1,10 do wait (0.1) frame.TextLabel.TextTransparency = loop/10 game:GetService ("RunService"). Stepped:Wait() end frame.TextLabel.BackgroundTransparency = 1 for loop = 1,10 do wait (0.1) frame.BackgroundTransparency = loop/10 game:GetService ("RunService"). Stepped:Wait() end wait(0.5) script.LoadingScreen:Destroy()

1 answer

Log in to vote
0
Answered by
pwx 1581 Moderation Voter
4 years ago

ScreenGuis have a property inside in which upon selected, will reset the UI and all the scripts inside upon death.

All you have to do is fix this is to go into the ScreenGui properties and unselect (set to false) ResetOnSpawn.

Hope this helped!

0
If it is just the intro script then it is probably better to to have a PlayerAdded event instead. ForeverBrown 356 — 4y
0
^ Or that, yes. pwx 1581 — 4y
Ad

Answer this question