Advertisement
Velinquish

Untitled

Apr 11th, 2020
251
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.51 KB | None | 0 0
  1. local RunService = game:GetService("RunService")
  2.  
  3. local player = game.Players.LocalPlayer
  4. local hum = player.Character.HumanoidRootPart
  5. local cam = workspace.CurrentCamera
  6.  
  7. RunService.RenderStepped:Connect(function()
  8.     local _, yRot, _ = cam.CFrame:ToEulerAnglesYXZ()
  9.     hum.CFrame = CFrame.new(hum.Position) * CFrame.Angles(0, yRot, 0)
  10.     -- Notice that this is an almost identical snippet of code as used in the Dash script
  11.     -- This CFrame.new() constructor just takes a position and orientation is default.
  12. end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement