Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

This part dragging script stays in one position only?

Asked by 8 years ago

So this part moving script works completely, but if I try to move then it still stays in the same position.

Mouse = game.Players.LocalPlayer:GetMouse()
Mouse.TargetFilter = workspace.Part
workspace.Part.BodyPosition.MaxForce = Vector3.new(math.huge, math.huge, math.huge)
Mouse.Move:connect(function()
    char = game.Players.LocalPlayer.Character
    local object = workspace.Part
    local Ray = Ray.new(char["Left Arm"].Position, Mouse.Hit.p.unit * 10)
    print(Ray)  
    object.BodyPosition.Position = Ray.Direction
end)

1 answer

Log in to vote
0
Answered by 8 years ago

Check to see if the Part is welded to anything (ex the Baseplate) - this would happen automatically if the baseplate has studs on top and the Part has inlets on the bottom (which is the default if you just place a part into the workspace). If it's a lone part, try calling :BreakJoints() on it at the beginning of the script.

Ad

Answer this question