Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

Why won't this work?

I have a brick named Jim. I want Jim to switch to random colors. Example: green, (waits 1 second) red (waits 1 second) blue (wait 1 second). You should get the point. Here is the snippit

while true do jim.BrickColor.Random() wait(1) jim.BrickColor.Random() wait(1) end

Now, when I run it. It does nothing. Also I want Jim to go transparency for 2 seconds then back to normal. Example: Jim is in transparency .5, in 2 seconds he'll switch to transparency .0 and it will be a loop. Here is a snippit

jim=script.Parent while jim do jim.Transparency=.5 wait(2) jim.Transparency=0 wait(2) end

Any help?

2 comments

2

You defined "jim", correct?

0

I don't think so.

1 answer

✓ Accepted answer

Here..

jim = game.Workspace.Jim
while true do
jim.BrickColor = BrickColor.random()
wait(1)
end

For your 2nd one...

jim = script.Parent
while true do
jim.Transparency = .5
wait(2)
jim.Transparency = 0
wait(2)
jim.Transparency = 1
end

3 comments

0

Thanks. It works :D

0

No problem. Give some credit to C0de. I thought you already had "jim" defined correctly.

0

Okay.

This discussion is preserved as it was. New answers, comments, and votes are closed.