Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

With pov still looking to right and left possible?

Asked by 5 years ago
Edited 5 years ago

Hello I have a POV gui with 1 textbuttons in it and i want to be still able to look to left or right when turning around camera or holding right mouse button like without pov but i want to do it in pov too is it even possible!? Code:

wait(1)
local Stepped = game:GetService("RunService").RenderStepped
cam = workspace.CurrentCamera
pal = game.Players.LocalPlayer.Character
deb = false
script.Parent.MouseButton1Click:Connect(function(plr)
    deb = not deb
    if deb == true then
        cam.CameraType = "Scriptable"
        script.Parent.Text = "STOP"
        repeat
            cam.CoordinateFrame = pal.Head.CFrame*CFrame.new(0,0,-0.3)
            Stepped:wait()
        until deb == false

        cam.CameraType = "Custom"
        script.Parent.Text = "POV"
    end
end)


Answer this question