For context: I have a viewmodel system I’ve been using that is simply a model that is set to the cameras CFrame every frame and it clips into things and it looks bad. I am trying to port it to a Viewport Frame with a World Model and have the lighting update every frame to be based on the sun, meaning the lighting in the Viewport Frame would be in the direction of the sun every frame but it doesn’t seem to work.
Edit: I use future lighting
Code:
game:GetService("RunService").Heartbeat:Connect(function()
script.Parent.LightDirection = game.Lighting:GetSunDirection()
end)