How to determine if a Humanoid has touched a spotlight?

Hello developers,
I am currently making a horror game, and I want to make a feature of where when a player activates their camera, the camera blinks, and whenever a Humanoid gets near it, it dies. Ive tried to do this but there are many errors.

here’s the script to make the camera blink also:

local Tool = script.Parent

local Handle = Tool.Handle

local Blink = Tool.Blink

local LightEmit = Tool.LightEmit.SpotLight

local Sound = Handle.Snap

local debounce = false

Tool.Activated:Connect(function()

if not debounce then

debounce = true

Sound:Play()

wait(0.5)

Blink.Transparency = 0

LightEmit.Enabled = true

wait(0.1)

Blink.Transparency = 1

LightEmit.Enabled = false

wait(3)

debounce = false

end

end)

image

You can create an invisible part the size of the spotlight, which has a kill script in it.

how can i make it so it only kills them, if the tool has been activated?

You can just have an invisible part that extends from the camera, which will kill the player if it touches them.

You should be using this module for detecting light: