RobloxScripterAI
Discord ↗
Link Copied to Clipboard
×
"Lights to flicker when monster is nearby"
-- Put this script inside the light local monster = game.Workspace.Monster local light = script.Parent local flicker = true local function flickerLight() if flicker then light.Brightness = light.Brightness + 0.5 wait(0.1) light.Brightness = light.Brightness - 0.5 wait(0.1) end end monster.Touched:Connect(function(hit) if hit.Parent.Name == "Player" then flicker = true while flicker do flickerLight() end end end) monster.TouchEnded:Connect(function(hit) if hit.Parent.Name == "Player" then flicker = false end end)