Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- :
- --[[ FE Unanchored Parts Follow
- Script made by Cyclically | Credits to dhruvil123 for a few parts of the script
- also credits to "Discordgotbanned" in discord for giving me motivation to fix this script
- https://v3rmillion.net/member.php?action=profile&uid=785986
- Don't edit script unless you know what you're doing. If you wanna add this into a script
- 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
- ]]
- local LocalPlayer = game:GetService("Players").LocalPlayer
- local unanchoredparts = {}
- local movers = {}
- for index, part in pairs(workspace:GetDescendants()) do
- if part:IsA("Part") and part.Anchored == false and part:IsDescendantOf(LocalPlayer.Character) == false then
- table.insert(unanchoredparts, part)
- part.Massless = true
- part.CanCollide = false
- if part:FindFirstChildOfClass("BodyPosition") ~= nil then
- part:FindFirstChildOfClass("BodyPosition"):Destroy()
- end
- end
- end
- for index, part in pairs(unanchoredparts) do
- local mover = Instance.new("BodyPosition", part)
- table.insert(movers, mover)
- mover.MaxForce = Vector3.new(math.huge, math.huge, math.huge)
- end
- repeat
- for index, mover in pairs(movers) do
- mover.Position = LocalPlayer.Character:FindFirstChild("HumanoidRootPart").CFrame:PointToWorldSpace(Vector3.new(0, 0, 5))
- end
- wait(0.5)
- until LocalPlayer.Character:FindFirstChild("Humanoid").Health <= 0
- for _, mover in pairs(movers) do
- mover:Destroy()
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement