I’m trying to create a custom script for dragging since the way i want it to work isnt available as a default option
-
when i try and drag a part it changes the mouse icon and if i havent fully disabled the default roblox dragdetector functionality it will drag but events for the dragdetector wont fire
-
ive tried changing dragstyle and responsestyle and havent found anything that fixes my issue in the devforums so far
im not sure but i think it might be something to do with me making it with a localscript but ive enabled runlocally
local velocity = script.Parent.Parent.AngularVelocity.AngularVelocity
local pmouse = Vector2.new(0,0)
local mouse = nil
script.Parent.DragStart:Connect(function(plr,ray)
mouse = plr:GetMouse()
pmouse = Vector2.new(mouse.X,mouse.Y)
print("e")
end)
script.Parent.DragContinue:Connect(function()
velocity += Vector3.new(0,pmouse.X-mouse.X,pmouse.Y-mouse.Y).Unit*(velocity.Magnitude-1+0.1)
print("e")
end)
script.Parent.DragEnd:Connect(function()
mouse = nil
pmouse = Vector2.new(0,0)
end)