I have created a script that can move parts with the player’s mouse, but if the part is moved close to another player it suddenly drops. I think it has something to do with network ownership but I’m unsure how to proceed.
script:
mouse.Move:Connect(function()
if selectedPart then
local humanoidRootPartPosition = character.HumanoidRootPart.Position
local rawPositionGoal = mouse.Hit.Position
local maxDistance = 15
local distance = (rawPositionGoal - humanoidRootPartPosition).Magnitude
local clampedDistance = math.clamp(distance, 0, maxDistance)
local modifiedPositionGoal = clampedDistance * (rawPositionGoal - humanoidRootPartPosition).Unit + humanoidRootPartPosition
selectedPart:WaitForChild("BodyPosition").Position = modifiedPositionGoal
end
end)