Advertisement
Guest User

Untitled

a guest
Aug 26th, 2022
51
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.60 KB | None | 0 0
  1. -- Local Script In StarterCharacterScripts
  2. local Workspace = game:GetService('Workspace');
  3. local Players = game:GetService('Players');
  4.  
  5. local player = Players.LocalPlayer;
  6. local character = player.Character or player.CharacterAdded:Wait();
  7. local humanoidRootPart = character:WaitForChild('HumanoidRootPart');
  8.  
  9. local currentCamera = Workspace.CurrentCamera;
  10. local gyro = Instance.new("BodyGyro");
  11. gyro.MaxTorque = Vector3.new(0,math.huge,0);
  12. gyro.P = 999999;
  13. gyro.Parent = humanoidRootPart;
  14.  
  15. currentCamera:GetPropertyChangedSignal("CFrame"):Connect(function()
  16.     gyro.CFrame = currentCamera.CFrame;
  17. end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement