Basically, i've been trying to make a repeating function where a brick either can collide, or can't collide. Every 3-4 seconds, it repeats the script. So in theory the script should randomly choose if its going to be a nocollide or collide part, and then in a set amount of time, it chooses again. I tried making it myself, but I have no idea what i'm doing, and I need massive help.
Heres my attempt:
- local num = math.random(1,2) while true do if num == 1 then script.Parent.CanCollide = false wait(0.4) elseif num == 2 then script.Parent.CanCollide = true wait(0.4) end end*

1 comment
Remember that you can press that "Lua" button in order to create code blocks.