Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- game.Players.LocalPlayer.CharacterAdded:Wait()
- wait(1)
- local Mouse = game.Players.LocalPlayer:GetMouse()
- local Camera = game.Workspace.CurrentCamera
- local defCFrame = Camera.CFrame --Default CFrame without mouse value
- local function Update()
- local mx = Mouse.X / 1000 --Reduce value for faster movement
- local my = Mouse.Y / 1000 --Reduce value for faster movement
- Camera.CFrame = defCFrame + Vector3.new(mx, -my, 0)
- defCFrame = Camera.CFrame - Vector3.new(mx, -my, 0)
- end
- game:GetService("RunService").RenderStepped:Connect(Update) --Update Camera.CFrame every frame
Add Comment
Please, Sign In to add comment