my intro is playing in the loading screen and I can't seem to figure out how to wait until the player is in the game so that the player can actually see the intro
local player = script.Parent.Parent rf = game.ReplicatedFirst rs = game.ReplicatedStorage vc = game.Workspace.Views repeat wait() until player.Character game.Workspace.CurrentCamera.CameraSubject = vc.V1 game.Workspace.CurrentCamera.CameraType = "Scriptable" game.workspace.Camera.CoordinateFrame = vc.V1.CFrame player.CameraMaxZoomDistance=25 player.Character.Humanoid.Name="Humanoid_" --anti reset from menu local a = rs.Theme:Clone() a.Parent=game.Workspace.CurrentCamera a:Play() local a = rf.EnterGui:Clone() a.Parent = player.PlayerGui wait(4) for n = 1,0,-0.1 do wait(0.1) a.Background_Frame.TextLabel.TextTransparency=n end wait(4) for n = 0,1,0.1 do wait(0.1) a.Background_Frame.TextLabel.TextTransparency=n end wait(4) for n = 1,0,-0.1 do wait(0.1) a.Logo_ImageLabel.ImageTransparency=n end wait(4) for n = 0,1,0.1 do wait(0.1) a.Background_Frame.BackgroundTransparency=n end
All you need is a check that the player exists.
As you're using a server script, we wait for script.Parent.Parent
to be a Player
.
repeat wait() until script.Parent.Parent.ClassName == "Player" local player = script.Parent.Parent --The rest of your script is identical to the original hereby rf = game.ReplicatedFirst rs = game.ReplicatedStorage vc = game.Workspace.Views repeat wait() until player.Character game.Workspace.CurrentCamera.CameraSubject = vc.V1 game.Workspace.CurrentCamera.CameraType = "Scriptable" game.workspace.Camera.CoordinateFrame = vc.V1.CFrame player.CameraMaxZoomDistance=25 player.Character.Humanoid.Name="Humanoid_" --anti reset from menu local a = rs.Theme:Clone() a.Parent=game.Workspace.CurrentCamera a:Play() local a = rf.EnterGui:Clone() a.Parent = player.PlayerGui wait(4) for n = 1,0,-0.1 do wait(0.1) a.Background_Frame.TextLabel.TextTransparency=n end wait(4) for n = 0,1,0.1 do wait(0.1) a.Background_Frame.TextLabel.TextTransparency=n end wait(4) for n = 1,0,-0.1 do wait(0.1) a.Logo_ImageLabel.ImageTransparency=n end wait(4) for n = 0,1,0.1 do wait(0.1) a.Background_Frame.BackgroundTransparency=n end