I need some to fix this script:
workspace = game.Workspace:getChildren()
antigrav = 0 --edit this for force of antigravity
gravforce = 195.5729088953 * antigrav
function check(object)
for i = 1, #object do
wait()
add(object[i])
end
end
function add(object)
if object.className == ("Model") or object.className == ("Tool") or object.className == ("Accoutrement") then
check(object:getChildren())
end
if object.className == ("Part") or object.className == ("Truss") then
if object.Anchored == false then
local bforce = Instance.new("BodyForce")
bforce.force = Vector3.new(0, ((object:getMass())*gravforce), 0)
bforce.Parent = object
end
end
end
check(workspace)
game.Workspace.ChildAdded:connect(function(object) add(object) end)

1 comment
Don't come on this site and expect us to just fix your broken code like that...