see what I mean in the video, im new to scripting and have no clue whats causing the jank movement, I think it's because it's interacting with itself but I wouldn't know how to fix that, anyone have any ideas?
heres the code:
local down = false
local UIS = game:GetService("UserInputService")
local dragpart = workspace.DragTask
local mouse = game.Players.LocalPlayer:GetMouse()
mouse.Button1Down:Connect(function()
down = true
end)
mouse.Button1Up:Connect(function()
down = false
end)
mouse.Move:Connect(function()
if down == true then
dragpart.CFrame = CFrame.new(mouse.Hit.X, 0, mouse.Hit.Z)
end
end)