So i need the part just to lay on the z axis but it goes up to the y axis if the mouse isnt moving its annoying so how would i remove the y axis?
coroutine.resume(coroutine.create(function()
local p = Instance.new("Part", workspace)
p.Anchored = true
p.CanCollide = false
while wait() do
local ray = Ray.new(workspace.Ball.Position, (mouse.hit.p - workspace.Ball.Position).unit * 5)
local distance = ((workspace.Ball.Position - mouse.hit.p).magnitude)
p.Size = Vector3.new(1,0.1,distance)
p.CFrame = CFrame.new(workspace.Ball.Position, mouse.hit.p)*CFrame.new(0, 0, -distance/2)
p.Color = Color3.new(1,0,0)
end
end))
