Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

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

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

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!

2 comments

0

If it is just the intro script then it is probably better to to have a PlayerAdded event instead.

0

^ Or that, yes.

This discussion is preserved as it was. New answers, comments, and votes are closed.