i made a script that when you press the TextButton it changes the camera type. Here is the script
sorry the title sounds weird nothing would work D:
local clicked = 1
script.Parent.MouseButton1Click:connect(function(a)
clicked = clicked + 1
print(clicked)
end)
local a = game.Players.LocalPlayer
if clicked == 1 then
local cam = game.Workspace.CurrentCamera
cam.CameraType = Enum.CameraType.Custom
end
if clicked == 2 then
local cam = game.Workspace.CurrentCamera
cam.CameraType = Enum.CameraType.Attach
end
What is wrong with the script?

1 comment
Also, set Clicked = 0