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

How to make player rotate relative to camera while having tool equipped and holding RMB? [closed]

Asked by 4 years ago

I already have it so that the player can rotate relative to their movement whilst the cursor is locked to the center screen. Here's the code for that in case it is needed.

01local Players = game:GetService("Players")
02local ContextActionService = game:GetService("ContextActionService")
03local UserInputService = game:GetService("UserInputService")
04local RunService = game:GetService("RunService")
05 
06local camera = workspace.CurrentCamera
07local cameraOffset = Vector3.new(2, 2, 5)
08local player = Players.LocalPlayer
09 
10player.CharacterAdded:Connect(function(character)
11 
12    local humanoid = character:WaitForChild("Humanoid")
13    local rootPart = character:WaitForChild("HumanoidRootPart")
14    humanoid.AutoRotate = true
15 
View all 50 lines...

Closed as Not Constructive by Leamir

This question has been closed because it is not constructive to others or the asker. Most commonly, questions that are requests with no attempt from the asker to solve their problem will fall into this category.

Why was this question closed?