I tried making a script where when you hover over a gui it the players camera moves. It works perfectly but the problem is only in offline mode "Play solo". I'm not sure how to fix it
varMax = 20 varCamMove = 0 varMax2 = 5 varCamMove2 = 0 cam = game.Workspace.CurrentCamera script.Parent.AA.MouseLeave:connect(function(x, y) varCamMove = 0 end) script.Parent.AA.MouseEnter:connect(function(x, y) varCamMove = 1 while varCamMove == 1 and varMax <50 do wait() local cam_rot = cam.CoordinateFrame - cam.CoordinateFrame.p local cam_scroll = (cam.CoordinateFrame.p - cam.Focus.p).magnitude local ncf = CFrame.new(cam.Focus.p)*cam_rot*CFrame.fromEulerAnglesXYZ(10, 5, 0) varMax = varMax+1 cam.CoordinateFrame = ncf*CFrame.new(0, 0, cam_scroll) print ("CamrotateRight" ..varMax.. "") end end) script.Parent.Left.MouseLeave:connect(function(x, y) varCamMove = 0 end) script.Parent.Left.MouseEnter:connect(function(x, y) varCamMove = 1 while varCamMove == 1 and varMax >5 do wait() local cam_rot = cam.CoordinateFrame - cam.CoordinateFrame.p local cam_scroll = (cam.CoordinateFrame.p - cam.Focus.p).magnitude local ncf = CFrame.new(cam.Focus.p)*cam_rot*CFrame.fromEulerAnglesXYZ(10, 0, 5) varMax = varMax-1 cam.CoordinateFrame = ncf*CFrame.new(0, 0, cam_scroll) print ("CamrotateLeft" ..varMax.. "") --{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}-- end end)
Thanks, Exsius.