Advertisement
Guest User

Untitled

a guest
Feb 4th, 2020
8,852
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.61 KB | None | 0 0
  1. :
  2. --[[ FE Unanchored Parts Follow
  3. Script made by Cyclically | Credits to dhruvil123 for a few parts of the script
  4. also credits to "Discordgotbanned" in discord for giving me motivation to fix this script
  5. https://v3rmillion.net/member.php?action=profile&uid=785986
  6. Don't edit script unless you know what you're doing. If you wanna add this into a script
  7.  
  8. the floating unanchored parts around u will stop floating when a player is near but it will come back when they get far away again, this is due roblox's gay ass networkownershit
  9. ]]
  10. local LocalPlayer = game:GetService("Players").LocalPlayer
  11. local unanchoredparts = {}
  12. local movers = {}
  13. for index, part in pairs(workspace:GetDescendants()) do
  14. if part:IsA("Part") and part.Anchored == false and part:IsDescendantOf(LocalPlayer.Character) == false then
  15. table.insert(unanchoredparts, part)
  16. part.Massless = true
  17. part.CanCollide = false
  18. if part:FindFirstChildOfClass("BodyPosition") ~= nil then
  19. part:FindFirstChildOfClass("BodyPosition"):Destroy()
  20. end
  21. end
  22. end
  23. for index, part in pairs(unanchoredparts) do
  24. local mover = Instance.new("BodyPosition", part)
  25. table.insert(movers, mover)
  26. mover.MaxForce = Vector3.new(math.huge, math.huge, math.huge)
  27. end
  28. repeat
  29. for index, mover in pairs(movers) do
  30. mover.Position = LocalPlayer.Character:FindFirstChild("HumanoidRootPart").CFrame:PointToWorldSpace(Vector3.new(0, 0, 5))
  31. end
  32. wait(0.5)
  33. until LocalPlayer.Character:FindFirstChild("Humanoid").Health <= 0
  34. for _, mover in pairs(movers) do
  35. mover:Destroy()
  36. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement