I have the following code:

local LocalPlayer = game.Players.LocalPlayer

workspace:WaitForChild(LocalPlayer.Name)

local Mouse = LocalPlayer:GetMouse()
local RunService = game:GetService("RunService")
local UpperTorso = LocalPlayer.Character:WaitForChild("UpperTorso", 5)

RunService.RenderStepped:Connect(function ()	
	UpperTorso.CFrame = CFrame.new(UpperTorso.Position, Vector3.new(Mouse.Hit.Position.X, Mouse.Hit.Position.Y, Mouse.Hit.Position.Z))
end)

But when I run it, this is what is looks like.

Any Ideas?

3 comments

0

So that you're aware I will be offline for the next 8-9 hours, but any answers would be appreciated.

0

Idk maybe try switching from Mouse.Hit.Position.Y to UpperTorso.Position.Y on line 10

0

are you trying to smoothly move the part?, if so use tween service, here is a video about it: https://www.youtube.com/watch?v=DLI5yw0Rtc0&t=81s