You can write your topic however you want, but you need to answer these questions:
-
I want to remove the weird things happening with my face mouse function
-
The Player isn’t supposed to look down, how to disable that?
Whenever the player looks down he goes in some random direction for no reason, how to stop that? -
I’ve been trying for hours to figure this out but i can’t plz help, im new
After that, you should include more details if you have any. Try to make your topic as descriptive as possible, so that it’s easier for people to help you!
This is the code inside StarterCharacterScripts
local player = game.Players.LocalPlayer
local mouse = player:GetMouse()
local character = player.Character or player.CharacterAdded:Wait()
local runService = game:GetService("RunService")
runService.RenderStepped:Connect(function()
local StartPosition = character:FindFirstChild("HumanoidRootPart").Position
local TargetPosition = mouse.Hit.p
local targetRot = Vector3.new(TargetPosition.X, 0, TargetPosition.Z)
character:FindFirstChild("HumanoidRootPart").CFrame = CFrame.new(StartPosition, targetRot)
end)
Please help me out on this