Can someone show me how I can make this into a repeating script? It still has to be Clicked()
function Clicked() brick = game.Workspace --Color part brick.SurfacePart.Lights.LightPart1.BrickColor = BrickColor.random() brick.SurfacePart.Lights.LightPart2.BrickColor = BrickColor.random() brick.SurfacePart.Lights.LightPart3.BrickColor = BrickColor.random() brick.SurfacePart.Lights.LightPart4.BrickColor = BrickColor.random() wait(0.5) brick.SurfacePart.Lights.LightPart1.PointLight.Color = Color3.random() brick.SurfacePart.Lights.LightPart2.PointLight.Color = Color3.random() brick.SurfacePart.Lights.LightPart3.PointLight.Color = Color3.random() brick.SurfacePart.Lights.LightPart4.PointLight.Color = Color3.random() end script.Parent.MouseButton1Down:connect(Clicked)
This will make it so it never stops.
function Clicked() brick = game.Workspace while true do --Color part brick.SurfacePart.Lights.LightPart1.BrickColor = BrickColor.random() brick.SurfacePart.Lights.LightPart2.BrickColor = BrickColor.random() brick.SurfacePart.Lights.LightPart3.BrickColor = BrickColor.random() brick.SurfacePart.Lights.LightPart4.BrickColor = BrickColor.random() wait(0.5) brick.SurfacePart.Lights.LightPart1.PointLight.Color = Color3.random() brick.SurfacePart.Lights.LightPart2.PointLight.Color = Color3.random() brick.SurfacePart.Lights.LightPart3.PointLight.Color = Color3.random() brick.SurfacePart.Lights.LightPart4.PointLight.Color = Color3.random() end end script.Parent.MouseButton1Down:connect(Clicked)
function Clicked() local brick = game.Workspace while true do brick.SurfacePart.Lights.LightPart1.BrickColor = BrickColor.Random() brick.SurfacePart.Lights.LightPart2.BrickColor = BrickColor.Random() brick.SurfacePart.Lights.LightPart3.BrickColor = BrickColor.Random() brick.SurfacePart.Lights.LightPart4.BrickColor = BrickColor.Random() wait(0.5) brick.SurfacePart.Lights.LightPart1.PointLight.Color = BrickColor.Random().Color brick.SurfacePart.Lights.LightPart2.PointLight.Color = BrickColor.Random().Color brick.SurfacePart.Lights.LightPart3.PointLight.Color = BrickColor.Random().Color brick.SurfacePart.Lights.LightPart4.PointLight.Color = BrickColor.Random().Color end end script.Parent.MouseButton1Down:connect(Clicked)
function Clicked() brick = game.Workspace while true do --Color part brick.SurfacePart.Lights.LightPart1.BrickColor = BrickColor.random() brick.SurfacePart.Lights.LightPart2.BrickColor = BrickColor.random() brick.SurfacePart.Lights.LightPart3.BrickColor = BrickColor.random() brick.SurfacePart.Lights.LightPart4.BrickColor = BrickColor.random() wait(0.5) brick.SurfacePart.Lights.LightPart1.PointLight.Color = Color3.random() brick.SurfacePart.Lights.LightPart2.PointLight.Color = Color3.random() brick.SurfacePart.Lights.LightPart3.PointLight.Color = Color3.random() brick.SurfacePart.Lights.LightPart4.PointLight.Color = Color3.random() end end script.Parent.MouseButton1Down:connect(Clicked)
I think this works, I didn't test it. I'm on my ipad right now