I'm recreating the old green cylinder that used to lay directly under your mouse (you guys remember that thing?), but I have encountered a problem. When the mouse is still, the part slowly drifts toward the camera, eventually reaching it. I dislike this. I do not believe this should happen. How can I stop this? Here's the script:
game.Players.PlayerAdded:connect(function(pl)
local part = Instance.new("Part")
part.Parent = game.Workspace
part.Rotation = Vector3.new(90,90,0)
part.BrickColor = BrickColor.new("Lime green")
part.Material = "SmoothPlastic"
part.Size = Vector3.new(.4,2.4,2)
part.Shape = "Cylinder"
part.Anchored = true
part.CanCollide = false
while true do
local m = pl:GetMouse()
part.Position = m.Hit.p
wait()
end
end)

1 comment
Thank you!