i want to make the orientation of a player look like the leg is looking at the core of the planet
issue is. i tried many solution and it didnt work.
i tried asking the assistant but well you know it didnt work.
my goal is to make a planet with its own gravity. well i made it pull the player but it dosent rotate the player into the core.
heres more images to showcase what i want to make
as you can see here the white ball is the core of the earth.
heres the script that i want to improve and maybe spot some bugs?.
local core = script.Parent.Parent["Earth's Core"]
local maxdistance = 1000
local lf = Instance.new("LineForce", core)
local db = false
script.Parent.Touched:Connect(function(hit)
if hit.Parent:FindFirstChild("HumanoidRootPart") then
if db == true then return end
local magnitude = (script.Parent.Parent["Earth's Core"].Position - hit.Parent:FindFirstChild("HumanoidRootPart").Position).Magnitude
if magnitude > maxdistance then
lf.Attachment0 = nil
else
lf.Attachment0 = hit.Parent:FindFirstChild("HumanoidRootPart").RootAttachment
end
lf.Attachment0 = hit.Parent:FindFirstChild("HumanoidRootPart").RootAttachment
lf.Attachment1 = lf.Parent.Attachment
lf.Magnitude = 3500
db = true
task.wait(1)
db = false
end
end)
any help would be appreciated