Please use a code block in the future
With using a code block, your code looks like this,
local Part1 = game.Workspace.FancyJumpParts.Part1
local Block1 = game.Workspace.JumpBlocks.Block1
while true do
Block1.BrickColor = BrickColor.Green()
wait(3)
Block1.BrickColor = BrickColor.Yellow()
wait(3)
Block1.BrickColor = BrickColor.Black()
wait(3)
Block1.BrickColor = BrickColor.Random()
wait(3)
end
while true do
Part1.BrickColor = BrickColor.Red()
Part1.CanCollide = false
wait(5)
Part1.BrickColor = BrickColor.Blue()
Part1.CanCollide = true
wait(5)
end
The problem,
Lua can only do one thing at a time, and it reads from top to bottom, mainly. Once the code reaches the first loop, it never sees the other one. It never breaks out.
There are multiple ways of fixing this, but since you want specific timings, I would suggest the simplest solution by using the spawn function.
This will allow your code to see both loops and deal with them accordingly.
local Part1 = game.Workspace.FancyJumpParts.Part1
local Block1 = game.Workspace.JumpBlocks.Block1
spawn(function()
while true do
Block1.BrickColor = BrickColor.Green()
wait(3)
Block1.BrickColor = BrickColor.Yellow()
wait(3)
Block1.BrickColor = BrickColor.Black()
wait(3)
Block1.BrickColor = BrickColor.Random()
wait(3)
end
end)
while true do
Part1.BrickColor = BrickColor.Red()
Part1.CanCollide = false
wait(5)
Part1.BrickColor = BrickColor.Blue()
Part1.CanCollide = true
wait(5)
end
Good Luck!
If I helped, please don't forget to accept my answer.