So, in my game, there are a bunch of GUIs that change the camera to face a block. Well, I want it where, when you press the button the camera goes back to normal and it no longer faces the block. The two scripts are in separate buttons, by the way. Code to make it go back to normal:
script.Parent.MouseButton1Click:Connect(function() game.Players.LocalPlayer.CameraMode = Enum.CameraMode.Classic end)
Script to make camera face a block:
script.Parent.MouseButton1Click:Connect(function() local Camera = game.Workspace.CurrentCamera local Player = game.Players.LocalPlayer -- Camera -- repeat wait() until Player.Character Camera.CameraType = "Scriptable" Camera.CFrame = game.Workspace.Cutscene4.CFrame end)
The only problem is, the camera doesn't change back to normal, it's stuck looking at the Cutscene4 block. Thank you!
I think that the problem you have is that everytime you click both functions are processed and the second one for some reason seems to be the only one that ends up changing. Try binding the first function to say "rightclick"
I ended up coming with my own solution. Script:
local player = game.Players.LocalPlayer player.CameraMode = Enum.CameraMode.LockFirstPerson wait(0) player.CameraMode = Enum.CameraMode.Classic