I need sleep
I’ve been searching for hours because I didn’t feel like making a post, but here I am…
Basically, I’m making a planet, simple enough, but you need to be able to walk on it (duh), but uh, even with the gravity the character doesn’t actually rotate on the planet and I can’t find any way to make that happen. Please help me Ì̷̧̬͈͇͈͓̀͌͘̚̕ͅ ̷͕͚̭͇̯̟̓̈̎S̶̙̗̱̬̭͕̬̽̈́̌̋̉͑͐̇͘T̵̩̟̘̫̬̯̻̱̍̊͊̑́Ỉ̶̛͔̩̜̟̋͌̅̓̄͠͝͝L̷̨̪̲͇̰̜̤̖͗̏͋̓͠L̷͉̟̭̙͒̓͂̒̒͘ ̶̨͓͔͔͔͇̦̞̒̇͌͜Ṋ̴̛̛̮͒̓͌͂̽͊È̵̥͚̞̩͓̦̐̈͌͜͠Ĕ̴̜͋̃͐D̵̼̆͊̃͌̓̑́̋ ̴̯͕̟̖̠̯͒̈́̆̈́͌̉͂̾̉͝Ş̴̨̘̥̭͓̻̠̄̌͊́̈́̈́̂̓͆͜͠ͅL̸̢̛̹̺̓̓̈́̽̀͆͌͂͘Ë̵̡̪͍̘̞́E̵̢̛̟̫̔͐̾̂̓̿͛̈́P̴̯͖̠͔̲̆͂̔ if you want the code to my gravity script here it is:
local plr = game.Players.PlayerAdded:Wait() or game.Players.LocalPlayer
local char = plr.CharacterAdded:Wait() or plr.Character
local hum = char.Humanoid
local humroot = char.HumanoidRootPart
local humanparts = char:GetChildren("MeshPart")
hum:SetStateEnabled(Enum.HumanoidStateType.Ragdoll, false) --yep, this didnt work either H̵̛̘͌̂̈̅̎͌̂̚Ȩ̵̩͇͕̐̈́͘̚L̵̨̙͔͛̽͂̅͋P̸̫͉̜̺̭͖͙̒̌͋̽͊̃̓͌̕͜
hum:SetStateEnabled(Enum.HumanoidStateType.GettingUp, false)
hum:SetStateEnabled(Enum.HumanoidStateType.FallingDown, false)
local M = workspace.M
local m = humroot
function GravityEquation(M,m)
local G = 6.673*10^(0-11)
local F = G*(M:GetMass()*m)
return F
end
function AddGravity()
local LineForce = Instance.new("LineForce", M)
local mass = 0
for i, v in pairs(humanparts) do
if v:IsA("MeshPart") then
mass += v:GetMass()
task.wait()
end
end
LineForce.ReactionForceEnabled = true
LineForce.InverseSquareLaw = true
LineForce.Magnitude = GravityEquation(M, mass)--*16.1290322581
LineForce.ApplyAtCenterOfMass = false
local Attachment0 = Instance.new("Attachment", M)
local Attachment1 = Instance.new("Attachment", m)
Attachment0.Name = "Attachment0"
Attachment1.Name = "Attachment1"
LineForce.Attachment0 = Attachment0
LineForce.Attachment1 = Attachment1
end
AddGravity()