Basically the code makes the yellow line follow the player on the X-Axis only on the ground, except it glitches and seems to jump up and down when it collides with objects like so in this screenshot even though CanColide is off

http://prntscr.com/k8gh91

This is a snippet of the code: (yellowposH is Character.HumanoidRootPart.Position.X that is constantly changing)

game:GetService("RunService").RenderStepped:Connect(function()
	data.YellowOffLineH.Position = Vector3.new(yellowposH, 2.234, -3.846)
end)

Any help at all would be greatly appreciated.

3 comments

3

This is because you're using position, use CFrame instead

1

data.YellowOffLineH.CFrame = CFrame.new(yellowposH, 2.234, -3.846)

0

Thank you ^^