How could I fix this wobble that it’s having sometimes?
that part of the script:
event5.OnServerEvent:Connect(function(plr,mouseTarget)
Model.Parent = workspace.Placing
stop()
Model.PrimaryPart.Anchored = false
Model.PrimaryPart.CanCollide = false
Model.PrimaryPart.Massless = true
Model.PrimaryPart.Part.Massless = true
local we = Model.PrimaryPart.Weldno
we.Part0 = mouseTarget.Parent
we.Part1 = nil
Model.PrimaryPart.CFrame = mouseTarget.CFrame:ToWorldSpace(CFrame.new(0,0,-2))*CFrame.Angles(math.rad(Diff),math.rad(Elev),math.rad(Rot))
we.Part1 = Model.PrimaryPart
if Elev == 360 then Elev = 0 end if Diff == 360 then Diff = 0 end if Rot == 360 then Rot = 0 end
if Elev == -360 then Elev = 0 end if Diff == -360 then Diff = 0 end if Rot == -360 then Rot = 0 end
end)
Event 5 is fired when the mouse is over a block
Diff/Elev/Rot is the rotations
the block cannot be anchored while the mouse is over another block
