OK, so I'm trying to script a part that randomly becomes invisible and CanCollide, and visible + Cannot Collide. I written this script, but it doesn't seem to work, maybe because I left out some information. here is what I have:
local wall = script.Parent
local m = math.random (1,(2))
enabled = true
if m == 1 then
wall.Transparency = 1
wall.CanCollide = false
end
if m == 2 then
wall.Transparency = 0
wall.CanCollide = true
end
I placed this script inside the part.
I don't really know, but am I missing something important so it can function properly?
