so basically this is a POV script where u click a GUI and it makes u go into POV, but it ends when you step, and I wanna make it so when you click it stays that way until you die.
wait(1)
local Stepped = game:GetService("RunService").RenderStepped
cam = workspace.CurrentCamera
pal = game.Players.LocalPlayer.Character
deb = false9
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
Line 23 looks like its turning deb false if the player isnt Sitting and any changes happen to humanoid, so just remove line 23.