I don't know why this won't work. It only works the first time. Help?
`while true do
game.Workspace.e.BrickColor = BrickColor.new(math.random())
print('color added!')
wait(0.5)
end`
I don't know why this won't work. It only works the first time. Help?
`while true do
game.Workspace.e.BrickColor = BrickColor.new(math.random())
print('color added!')
wait(0.5)
end`
e = Instance.new('Part',workspace) e.Size = Vector3.new(3,3,3) wait() --[[while wait(.4) do e.BrickColor = BrickColor.Random() print('Color Added!') wait(.1) end--]]
--[[What I think you did was just take the variable "e" that you named above the script you inserted and use it as the name for the part, when what you should have done is Part.Name = 'e' and then game.Workspace.e because at that point the script looks for a part in the workspace named e rather than looking in the script for a variable named e. Hope it helped--]]
--If you want the printing to stop when the brick is not in the workspace do this --[[ if e then while wait(.4) do e.BrickColor = BrickColor.Random() print('Color Added!') wait(.1) end end --]]
You can replace while true do with while wait(0.5) do, And you can replace math.random() with BrickColor.Random()
while wait(0.5) do
game.Workspace.e.BrickColor = BrickColor.Random()
end
while true do == Also to point out you added ' ~ '
game.Workspace.e.BrickColor = BrickColor.new(math.random)) -- slash = 2
print('color added!')
wait(0.5)
end`
This discussion is preserved as it was. New answers, comments, and votes are closed.
1 comment
Wiat