Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

Why does this Gravitation fail?

Asked by
iNicklas 215 Moderation Voter
9 years ago

Okay, so when I walk on my little sphere, when im around halfway my character trips and then gets frozen. I don't know how to explain.

http://www.roblox.com/games/196910826/gravity-test

function Spawn(Character)

        local Gon = Instance.new("Part")
    Gon.Name = "GravitationalOrientation"
    Gon.FormFactor = "Symmetric"
    Gon.Size = Vector3.new(1,1,1)
    Gon.TopSurface = "Smooth"
    Gon.BottomSurface = "Smooth"
    Gon.Transparency = 1
    Gon.CanCollide = false
    Gon.CFrame = Character.Torso.CFrame
    Gon.Parent = Character

        Instance.new("Weld",Gon)
    Gon.Weld.Part1 = Gon
    Gon.Weld.Part0 = Character.Torso
    Gon.Weld.C1 = CFrame.new(0,0,0) * CFrame.Angles(math.pi/2,0,0)

        local Pull = Instance.new("RocketPropulsion")
    Pull.CartoonFactor = 1
    Pull.Target = workspace.Part

    Pull.Parent = Gon
    Pull:Fire()

    local Gravity = 196.2
    local Articles = Character:GetChildren()

    for Index = 1, #Articles do
        if Articles[Index]:IsA("BasePart") then
            Instance.new("BodyForce",Articles[Index])
            Articles[Index].BodyForce.force = Vector3.new(0,Articles[Index]:GetMass()*Gravity,0)
        elseif Articles[Index]:IsA("Hat") then
            Instance.new("BodyForce",Articles[Index].Handle)
            Articles[Index].Handle.BodyForce.force = Vector3.new(0,Articles[Index].Handle:GetMass()*Gravity,0)
        end
    end

end

game.Players.PlayerAdded:connect(function(Player)
    Player.CharacterAdded:connect(Spawn)
end)


Answer this question