RobloxScripterAI
Discord ↗
Link Copied to Clipboard
×
"how to make a flickering light when monster is nearby"
-- local script local part = script.Parent local monster = game.Workspace.Monster local light = Instance.new("PointLight") light.Parent = part light.Range = 25 light.Brightness = 5 while true do local distance = (monster.Position - part.Position).magnitude if distance < 10 then light.Enabled = true wait(0.5) light.Enabled = false wait(0.5) else light.Enabled = false end wait(0.1) end