So, I made a script for the play button at first the GUI wouldn't go away, but with some help it finally was able to go away; however now the camera is not letting me script it to be scriptable

local Camera = workspace.CurrentCamera

local PlayButton = game.StarterGui.MainMenu.Frame.PlayBTN

function Camer()
	repeat wait()
		Camera.CameraType = Enum.CameraType.Scriptable
	until
	Camera.CameraType == Enum.CameraType.Scriptable
	end
	
	
	
	script.Parent.MouseButton1Click:Connect(function()
	Camera.CameraType = Enum.CameraType.Custom
	script.Parent.Parent.Visible = false
end)

This is the code I used to make the playbutton and the Camera. I'm not entirely sure what is going wrong, at first I didn't have it as a function and it still didn't work so I tried to do it as a function and it still didn't work lol. I need some help figuring out why it isn't working.

2 comments

0

What exactly are you trying to accomplish with Scriptable Cameratype. You seem to change it to scriptable and not do anything more with it.

0

And I dont think there is a point in having the Camer() function