I just realised that I don’t have the camera script fully working yet so I can’t see if it restarts on reset or not. The issue is I don’t know how to reset the camera to view the character again, I’ve tried multiple ways but it doesn’t work. The script is below. What could I add in that would reset the player’s camera?
local button = script.Parent
local StarterGui = game:GetService("StarterGui")
local camera = game.Workspace.CurrentCamera
local player = game.Players.LocalPlayer
button.MouseEnter:Connect(function()
button:TweenSize(UDim2.new(0, 167,0, 47),"Out","Quad",0.1,true)
end)
button.MouseLeave:Connect(function()
button:TweenSize(UDim2.new(0, 152,0, 39),"Out","Quad",0.1,true)
end)
script.Parent.MouseButton1Click:Connect(function()
camera.CameraType = "Custom"
camera.CameraSubject = player.Character.Humanoid
camera.CameraType = "Custom"
camera.CFrame = player.Character.Head.CFrame
script.Parent.Visible = false
script.Parent.Parent.Parent.IntroScreen.Frame1.Visible = true
script.Parent.Parent.Parent.IntroScreen.Frame1:TweenSize(UDim2.new(4, 0,4, 0),"Out","Quad",2,true)
wait(0.5)
script.Parent.Parent.Parent.IntroScreen.Frame1.Frame2.Visible = true
wait(0.5)
script.Parent.Parent.Parent.IntroScreen.Frame1.Frame2:TweenSize(UDim2.new(4, 0,4, 0),"Out","Quad",3,true)
wait(0.5)
script.Parent.Parent.Parent.IntroScreen.Frame1.Frame2.Frame3.Visible = true
script.Parent.Parent.Parent.IntroScreen.Frame1.Frame2.Frame3:TweenSize(UDim2.new(4, 0,4, 0),"Out","Quad",3,true)
wait(1)
script.Parent.Parent.Parent.IntroScreen.Welcome.Visible = true
wait(1.5)
script.Parent.Parent.Parent.IntroScreen.Kool.Visible = true
script.Parent.Parent.Parent.IntroScreen.Kafe.Visible = true
wait(0.5)
script.Parent.Parent.Parent.IntroScreen.TextLabel.Visible = true
script.Parent.Parent.Parent.IntroScreen.TextLabel.Text = ("Loading Assets... (1/3)")
wait(1)
script.Parent.Parent.Parent.IntroScreen.TextLabel.Text = ("Loading Assets... (2/3)")
wait(2)
script.Parent.Parent.Parent.IntroScreen.TextLabel.Text = ("Loading Assets... (3/3)")
wait(3)
script.Parent.Parent.Parent.IntroScreen.Frame1:TweenSize(UDim2.new(0.01, 0,0.01, 0),"Out","Quad",2,true)
wait(0.5)
script.Parent.Parent.Parent.IntroScreen.Kafe.Visible = false
script.Parent.Parent.Parent.IntroScreen.Kool.Visible = false
script.Parent.Parent.Parent.IntroScreen.Welcome.Visible = false
script.Parent.Parent.Parent.IntroScreen.TextLabel.Visible = false
wait(0.5)
script.Parent.Parent.Parent.AllGui.Enabled = true
script.Parent.Parent.Parent.Point.Enabled = true
wait(1)
game.StarterGui.IntroGUI:Destroy()
StarterGui:SetCoreGuiEnabled(Enum.CoreGuiType.All, true)
player.PlayerGui.IntroScreen:Destroy()
end)