local DevEmount = 20
local EarthY = game.Workspace.Earth.CFrame.Y
local EarthZ = game.Workspace.Earth.CFrame.Z
local FinalY = -EarthY*DevEmount
local FinalX = EarthZ*DevEmount
local Place = UDim2.new(0.5, FinalX, 0.5, FinalY)
Screen.SurfaceGui.Tests.EarthTracker.Position = Place
This kinda works??
SO to explain: “Earth” is a part and “EarthTracker” is a frame on a surface gui
Im trying to get the hight and left and right movement from the earth, and transate it to the gui so it looks like the gui is hovering over the earth.
This is what the code does right now:
The red arrow indicates where the tracker SHOULD be. Im thinking that the tracker is inverted, but when i try to un-invert it the whole thing breaks…
IF anyone can help im not very good with math and ive never tried to do all of this before.