So i have an 2d camera system that works fine. But then i added a billboardgui on an ai thats moving and it dissapears after like 50 studs.
But then i tried disabling the camera scripts and it worked. The gui did not dissapear
So do anyone have a solution to this?
the script handling the 2d camera looks like this
local Players = game:GetService("Players")
local RunService = game:GetService("RunService")
local player = Players.LocalPlayer
local camera = workspace.CurrentCamera
camera.CameraType = Enum.CameraType.Scriptable
RunService.RenderStepped:Connect(function()
local character = player.Character
if character and character:FindFirstChild("HumanoidRootPart") then
local root = character.HumanoidRootPart
local topDownPosition = root.Position + Vector3.new(0, 50, 0) -- height of camera
local lookAt = root.Position
camera.CFrame = CFrame.new(topDownPosition, lookAt)
end
end)
** You are now Level 1! **