Flashlight is not working.. help me please

this flashlight script is not working and i have no idea why, help
It says PointLight is not a valid member of LocalScript "Players.SpynApple_P.Backpack.LocalScript" - Client - LocalScript:13 but there is a pointlight in players → spynapple_p → backpack → localscript
image

LocalScriptдшпре.rbxm (3.4 KB)
image

2 Likes

I’d assume the problem you are running into is that the LocalScript runs before the PointLight loads in a client. I’d suggest using the :WaitForChild() function when referencing the PointLight.
Example:

local PointLight = script:WaitForChild("PointLight")
2 Likes