I’ve been trying to implement a system where I use an ImageHandleAdornment to replace the sun. After many hours of failed attemps i’ve come here as a last hope. “Moon” is refering to the ImageHandleAdornment which IS visible when I playtest the game however is not covering the sun.
For reference I’m trying to replicate this posts solution however with a ImageHandleAdornment: strong text
local Lighting = game:GetService("Lighting")
local Player = Players.LocalPlayer
local PlayerGui = Player.PlayerGui
local GameUI = PlayerGui:WaitForChild("GameUI")
local MoonUi = GameUI.MoonUI
local Moon = MoonUi.Moon
local distFromCam = 16
game:GetService("RunService").RenderStepped:Connect(function()
local cameraPosition = workspace.CurrentCamera.CFrame.Position
local sunDirection = Lighting:GetSunDirection()
Moon.CFrame = CFrame.new(cameraPosition + sunDirection * distFromCam)
end)```
I noticed it does do clipping into the map, so you might need to figure out where the map ends and adjust the size and distance from camera based on that.