Worldtoviewportpoint is giving me the wrong X co-ordinates, Please help

You can write your topic however you want, but you need to answer these questions:

  1. What do you want to achieve? Keep it simple and clear!
    I want my code to work, but it doesn’t want to
  2. What is the issue? Include screenshots / videos if possible!
    my world to screenpoint is giving me the wrong x co-oordinates.
    I tried using this and other methoods, but nothing worked
    Please help
     local viewport = eggui.AbsoluteSize
     local viewportAspect = viewport.Y / viewport.X
     local cameraAspect = camViewport.X / camViewport.Y
     local aspectModification = viewportAspect / cameraAspect
     xCoord -= 0.5
     xCoord *= aspectModification
     xCoord += 0.5
     return xCoord
    

end```
3. What solutions have you tried so far? Did you look for solutions on the Developer Hub?
devforum searched every post on the topic and nothing helped
After that, you should include more details if you have any. Try to make your topic as descriptive as possible, so that it’s easier for people to help you!

this is a custom viewport and camera

1 Like

please help me robloxcharlimit