Advertisement
ZHFK

Move part

Jan 18th, 2021
91
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.91 KB | None | 0 0
  1. game:GetService("RunService").Stepped:connect(function()
  2. game:GetService("Players").LocalPlayer.MaximumSimulationRadius = math.pow(math.huge,math.huge)*math.huge
  3. game:GetService("Players").LocalPlayer.SimulationRadius = math.pow(math.huge,math.huge)*math.huge
  4. wait()
  5. end)
  6.  
  7. local Mouse = game.Players.LocalPlayer:GetMouse()
  8. local Unanchored = {}
  9.  
  10. for index, part in pairs(workspace:GetDescendants()) do
  11. if part:IsA("Part") and part.Anchored == false and part:IsDescendantOf(game:GetService("Players").LocalPlayer.Character) == false then
  12. table.insert(Unanchored,part)
  13. end
  14. end
  15.  
  16. for i = 1, #Unanchored do
  17. Unanchored[i].Parent = workspace
  18. local BD = Instance.new("BodyPosition")
  19. BD.Parent = Unanchored[i]
  20. BD.Name = "BD"
  21. end
  22.  
  23. while wait() do
  24. for i = 1, #Unanchored do
  25. Unanchored[i].BD.Position = Mouse.Hit.Position
  26. end
  27. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement