Light it up!

Light up a part

Put this as a script under the part you want to light up

lightPart = script.Parent
local canLight = true

function lightOn(bodypart)

    if canLight then
        canLight = false
        local light = Instance.new("PointLight")
        light.Parent = lightPart
        light.Range = 25
        light.Brightness = 5
        wait(5)
        lightPart.PointLight:Destroy()
        canLight = true
    end
  
end
 
lightPart.Touched:Connect(lightOn)

Light up a person

Put this as a script under the part you want to use to light up the player

lightPart = script.Parent
local canLight = true

function lightOn(bodypart)

    if canLight then
        canLight = false
        local light = Instance.new("PointLight")
        light.Parent = bodypart
        light.Range = 25
        light.Brightness = 5
        wait(5)
        bodypart.PointLight:Destroy()
        canLight = true
    end
  
end
 
lightPart.Touched:Connect(lightOn)