The code is for a color move game but when I try to run it I got this "MSG is not a valid member of Workspace" but I set MSG to Workspace please help.
---- Locals
local blue = game.Workspace.Model.Blue
local red = game.Workspace.Model.Red
local green = game.Workspace.Model.Green
local yellow = game.Workspace.Model.Yellow
---- Main Code
while true do
wait(1)
idkmath = math.random(1, 4)
if idkmath == 1 then --- bule
MSG = Instance.new("Message")
MSG.Parent = game.Workspace
MSG.Text = ("GO to bule")
wait(1)
game.Workspace.MSG:Remove()
wait(1)
red.CanCollide = false
green.CanCollide = false
yellow.CanCollide = false
elseif idkmath == 2 then --- red
MSG = Instance.new("Message")
MSG.Parent = game.Workspace
MSG.Text = ("GO to red")
wait(1)
game.Workspace.MSG:Remove()
wait(1)
blue.CanCollide = false
green.CanCollide = false
yellow.CanCollide = false
elseif idkmath == 3 then --- green
MSG = Instance.new("Message")
MSG.Parent = game.Workspace
MSG.Text = ("GO to green")
wait(1)
game.Workspace.MSG:Remove()
wait(1)
blue.CanCollide = false
red.CanCollide = false
yellow.CanCollide = false
else if idkmath == 4 then
MSG = Instance.new("Message")
MSG.Parent = game.Workspace
MSG.Text = ("GO to yellow")
wait(1)
game.Workspace.MSG:Remove()
wait(1)
blue.CanCollide = false
green.CanCollide = false
red.CanCollide = false
end
end
end

2 comments
what line is this erroring at?
oh nvm, the answer below is what you need