Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -- SCARY FLASHLIGHTS TUTORIAL BY BLOXIANCODE youtube.com/c/BloxianCode
- -- Tutorial: https://youtube.com/shorts/EpbP6X1TvGY
- while true do --creates a while loop. All code inside this loop will loop forever
- for i, part in pairs(script.Parent:GetChildren()) --Script goes through all parts in the folder where this script is located
- if part:FindFirstChild("SpotLight") then --if a part has a SpotLight in it, then..
- local light = part.SpotLight --create a variable for the SpotLight
- light.Enabled = false --Turn the light off by disabling the light
- wait(math.random(0,1)) --let the script wait a random amount of time between 0 and 1 second
- light.Enabled = true --Turn the light back on by enabling the light
- wait(math.random(0,1)) --let the script wait a random amount of time between 0 and 1 second
- end --end the if-statement
- end --end the for-loop
- end --end the while-loop
Advertisement
Add Comment
Please, Sign In to add comment