Results 1 to 3 of 3

Thread: Gravity to an objekt

  1. #1

    Default Gravity to an objekt

    Hi =)
    Im making a 2d (wana b mmorpg) sci fi game, and i would like to have so that
    the earth im making sould have gravity
    Which meens the players gets draged to the earth instead of down
    and when you walk around the earth your players cframe changes and the cameras cframe changes to so the guy always seems to stay straight up when he is at the bottom of the planet
    Could someone make this script for me?
    I know its kinda noobish asking for a whole script but iv only scripted in lua in roblox and this doesnt look like the roblox lua, Ty

    Oh and if you play roblox im PlaceRebuilder =)

  2. #2

    Default oh and

    maybe the camera angole should look something like:

    while true do
    local a = script.Parent.CFrame
    GetCamera.CFrame = a

    and what should stand instead of script parent since i noticed it doesnt work in nova

  3. #3

    Default Ok i got a starter, can i get help fixing it?

    local massConstant = 1

    local mass = 100000 * massConstant

    local min = 0
    local max = 550
    while true do
    local child = entyNumber:GetID()
    local relPos = this:GetPos() - child:GetPos()
    if relPos.magnitude * 240 * massConstant < mass then
    local canContinue = true
    if relPos.magnitude * 320 * massConstant < mass then
    local length = mass / (320 * relPos.magnitude * massConstant)
    if childSize[n].z * length > relPos.magnitude * 2 then
    mass = mass + child:GetMass()
    if canContinue then
    local motivator = child:FindFirstChild("BlackHole Influence")
    if motivator == nil then
    motivator ="BodyPosition")
    motivator.Parent = child
    motivator.Name = "BlackHole Influence"
    motivator.position = this:GetPos()
    motivator.maxForce = (1) * mass * child:GetMass() / (relPos.magnitude * massConstant)
    local motivator = child:FindFirstChild("BlackHole Influence")
    if motivator ~= nil then

    lolz i get stuck at wait since this lua doesnt have that command
    Can someone help me fix this?

Similar Threads

  1. Need help with gravity settings.
    By Uhfgood in forum Novashell Game Creation System
    Replies: 13
    Last Post: 06-20-2008, 04:50 AM



Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts