So I edited this intro, and I cant make it work with when you reset or die the intro doesnt show up anymore. I just want it to show up when you start the game, and thats it only once. Thanks!
First I placed this on a script inside startergui
local legui = script.Intro:Clone() game.Players.PlayerAdded:connect(function(player) player.CharacterAdded:wait() legui:Clone().Parent = player.PlayerGui end)
Then I placed a gui inside the script and made a local script
local Screen = script.Parent local Config = Screen.Config local Filter = Screen.Filter local Content = Screen.Content function FilterFade(start,finish,step) for i = start,finish,0.03/step do Filter.BackgroundTransparency = i wait() end Filter.BackgroundTransparency = finish end Filter.Visible = true for _,image in pairs(Content:GetChildren()) do image.Visible = false end wait(Config.Padding_Time.Value) for _,image in pairs(Content:GetChildren()) do image.Visible = true FilterFade(0,1,Config.Fade_Time.Value) wait(Config.Display_Time.Value) FilterFade(1,0,-Config.Fade_Time.Value) image.Visible = false wait(Config.Display_Time.Value) end wait(Config.Padding_Time.Value) Screen.Background.Visible = false FilterFade(0,1,Config.Fade_Time.Value) Screen:Remove()
What you should do is add a boolean value in the Player (when they join), thats something like "ViewedIntro", and when the intro has been viewed, have it go into the Player and check if said value is true or not before it plays the intro, if true, it removes the GUI, else, plays the GUI and sets the value to true, something like:
local legui = script.Intro:Clone() game.Players.PlayerAdded:connect(function(player) player.CharacterAdded:wait() if player:FindFirstChild("ViewedIntro") then if player.ViewedIntro.Value == true then return end else local newgui = legui:Clone() newgui.Parent = player.PlayerGui newgui.LocalScriptsName.Disabled = false --[ Change "LocalScriptsName" to the name of the script in the GUI. ] end end)
And for the GUI's code (Have the script's Disabled property set to true in the GUI):
local Screen = script.Parent local Player = Screen.Parent.Parent local Config = Screen.Config local Filter = Screen.Filter local Content = Screen.Content if not Player:FindFirstChild("ViewedIntro") then local HasViewed = Instance.new("BoolValue", Player) HasViewed.Value = true; elseif Player:FindFirstChild("ViewedIntro") and Player.ViewedIntro.Value == true then Screen:remove() end function FilterFade(start,finish,step) for i = start,finish,0.03/step do Filter.BackgroundTransparency = i wait() end Filter.BackgroundTransparency = finish end Filter.Visible = true for _,image in pairs(Content:GetChildren()) do image.Visible = false end wait(Config.Padding_Time.Value) for _,image in pairs(Content:GetChildren()) do image.Visible = true FilterFade(0,1,Config.Fade_Time.Value) wait(Config.Display_Time.Value) FilterFade(1,0,-Config.Fade_Time.Value) image.Visible = false wait(Config.Display_Time.Value) end wait(Config.Padding_Time.Value) Screen.Background.Visible = false FilterFade(0,1,Config.Fade_Time.Value) Screen:remove()
Hope that helped (and worked), :) Regards, Xetrax