So, I've been working on my horror game. And i don't know, why but this is not working.
local LightTrigger = game.Workspace.LightTrigger
LightTrigger.Touched:Connect(function(hit)
if hit and hit.LightTrigger:FindFirstChild("Humanoid") then
script.Parent.Parent.BrickColor = BrickColor.new(255,255,255)
script.Parent.Enabled = true
script.Parent.Parent.SurfaceLight.Enabled = true
LightTrigger:Destroy()
end
end)

2 comments
what is not working, where is the script located, is it not running at all or not destroying the light trigger on touch? Are there any errors in the output?
this question lacks a lot of informations