Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

2D Game Not Letting Lights Work?

Asked by 2 years ago

I'm trying to make a 2D game but I can't make the pointlight work. In studio I see the light where I put it, but then when I playtest, it's gone. What keeps happening? Here is the script I'm using for the camera.

local player = game.Players.LocalPlayer
local camera = workspace.CurrentCamera

player.CharacterAdded:Wait()
player.Character:WaitForChild("HumanoidRootPart")

camera.CameraSubject = player.Character.HumanoidRootPart
camera.CameraType = Enum.CameraType.Attach
camera.FieldOfView = 40

game:GetService('RunService').Stepped:Connect(function()
    camera.CFrame = CFrame.new(player.Character.HumanoidRootPart.Position) * CFrame.new(0,0,24)
end)
0
if your problem is with the pointlight then why are you giving us the camera script? Benbebop 1049 — 2y
0
I put the camera script because whenever I remove it, the lights work fine but then when I put the script in, the lights don't work bringtixbackalready 7 — 2y

Answer this question