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

Intro keeps replaying after I die, and no matter what I do, it won't stop. Can someone please help?

So I have an intro, and basically its tweened, and for some reason it replays after death. I've tried everything from adding a new frame with a textbutton that destroys the gui, to just directly adding it to the script, but NOTHING WORKS. Can someone please help? Script:

repeat wait() until game.Players.LocalPlayer:FindFirstChild("PlayerGui")
local ContentService = game:GetService("ContentProvider")
local bar = script.Parent.LoadingFrame.UnderLayer.OverLayer
local logo = script.Parent.Logo
---Start Intro---
script.Parent.Title.Position = UDim2.new(0,0,-1,0)
logo.Position = UDim2.new(0.4,0,1,0)
script.Parent.LoadingFrame.Position = UDim2.new(0,0,-1,0)
---End Positioning--

---Start Moving Positioning---
script.Parent.Title:TweenPosition(UDim2.new(0,0,0.2,0), "In","Bounce", 2)
script.Parent.LoadingFrame:TweenPosition(UDim2.new(0,0,0.4,0),"In", "Bounce",2)
wait(3)


---Loading Bar Action---
local AmountOfAssestsLoaded = script.Parent.LoadingFrame.AssetsLoaded
local AllAssets = game.ContentProvider.RequestQueueSize
AssetsLoaded = game.ContentProvider.RequestQueueSize
AmountOfAssestsLoaded.Value = game.ContentProvider.RequestQueueSize
while game.ContentProvider.RequestQueueSize > 0 do
 if game.ContentProvider.RequestQueueSize < AssetsLoaded then
  AmountOfAssestsLoaded.Value = game.ContentProvider.RequestQueueSize
  AmountOfAssestsLoaded.Changed:connect(function(assetstoload)
   local newx = 1 - AmountOfAssestsLoaded.Value / AllAssets
   bar:TweenSize(UDim2.new(0,1,0)"Out","Quad",0.5,true)
  end)
 end
 wait()
end
bar:TweenSize(UDim2.new(1,0,1,0),"Out","Quad",0.5,true)
---End Loading Bar Action---
wait(2)
---Send LoadingBar to the right---
script.Parent.LoadingFrame:TweenPosition(UDim2.new(1,0,.4,0),"Out","Quad",2)
--Send Logo Down--
logo.Visible = true
logo:TweenPosition(UDim2.new(0.17,0,0.33,0),"In","Quint",2)
wait(3)
script.Parent:TweenPosition(UDim2.new(1,0,0,0),"Out","Elastic",2)
script.Parent.Parent.Parent.AssetSkip:Destroy()

The bottom line refers to the skip button I made, and whenever the intro completes, it takes the skip button with it.

1 comment

0

The lack of proper indentation in your code is making my eyes bleed.

1 answer

✓ Accepted answer

Make sure on your screen gui you untick ResetOnSpawn

1 comment

0

.... oh yeah...

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