So basically what I am having trouble with is, when Title.Playbutton is clicked, everything works fine except the cam.CameraSubject. Everything from line 7 and up works, line 9 and down is where I am ahving issues. Thank you for taking your time to deal with my dumb issues., :)
cam = game.Workspace.CurrentCamera local player = game.Players.LocalPlayer intro = player.PlayerGui:WaitForChild("Intro") cam.CameraSubject = game.Workspace.IntroFocus cam.CameraType = "Attach" Instance.new("BlurEffect", cam).Size = 11 intro.Title.PlayButton.MouseButton1Click:connect(function() cam.CameraSubject = player.Character.Humanoid cam.CameraType = "Fixed" print'camerafix' end)
Ok, I've tried to recreate the problem and seems out it is way more complicated than I thought.
Here is the final script I put into which I believe is the solution:
local cam = game.Workspace.CurrentCamera local player = game.Players.LocalPlayer local intro = player.PlayerGui:WaitForChild("Intro") cam.CameraSubject = game.Workspace.IntroFocus cam.CameraType = "Scriptable" cam.CoordinateFrame = CFrame.new(workspace.IntroFocus.Position) --Position of target * CFrame.Angles(0, angle, 0) --Rotates in radians(math.rad) * CFrame.new(0, 0, 8) --Move the camera backwards -- If you don't want this then just delete and put back the CameraType to 'Attach'; but I ran into -- issues using it. Instance.new("BlurEffect", cam).Size = 11 intro.Title.PlayButton.MouseButton1Click:connect(function() cam.CameraSubject = player.Character.Humanoid cam.CameraType = "Custom" -- this returns the cameraPostion back to the player game:GetService('RunService').RenderStepped:wait() -- wait till the camera gets rendered and does not overwrite. cam.CameraType = 'Fixed' print'camerafix' end)
Not sure if this will work out for you, but this the best I could do
EDIT: Code edited