I am making a very early alpha of my game and i want a temp button to make the camera normal and not the RPG camera i have in it so i have a button but the game doesnt like me changing the camera type after its been scripted so it changes the type but behaves the same and if i delete it after changing the camera type it freezes the camera
Here is the buttons code:
local camera = workspace.CurrentCamera
function leftClick()
camera.CameraType = Enum.CameraType.Follow
end
script.Parent.MouseButton1Click:Connect(leftClick)
local camera = workspace.CurrentCamera
game.Players.PlayerAdded:connect(function()
camera.CameraType = Enum.CameraType.Scriptable
end)
function leftClick()
camera.CameraType = Enum.CameraType.Follow
end
script.Parent.MouseButton1Click:Connect(leftClick)