In the script listed below, its a script that when you click a button in a GUI, it becomes POV. how do I make this happen forcefully, like if you were to enter the game you would simply go POV instantly.
wait(1)
local Stepped = game:GetService("RunService").RenderStepped
cam = workspace.CurrentCamera
pal = game.Players.LocalPlayer.Character
deb = false
script.Parent.MouseButton1Click:connect(function()
deb = not deb
if deb == true then
cam.CameraType = "Scriptable"
script.Parent.Style = "RobloxRoundDefaultButton"
script.Parent.TextColor3= Color3.new(1,0,0)
repeat
cam.CoordinateFrame = pal.Head.CFrame*CFrame.new(0,0,-0.3)
Stepped:wait()
until deb == false
cam.CameraType = "Custom"
script.Parent.Style = "RobloxRoundButton"
script.Parent.TextColor3= Color3.new(.5,.5,.5)
end
end)
pal.Humanoid.Changed:connect(function() if pal.Humanoid.Sit == false then deb = false end end)

1 comment
player.CameraMode = Enum.CameraMode.LockFirstPerson