I'm trying to make a fountain, so I wanted to make the water coming out of it to be random transparency so it looks real. But it won't work.
trans = {.1,.2,.3,.4,.5,.6,.7,.8,.9} while true do wait(1) script.Parent.Transparency(math.random(#trans)) end
You have to place and = sign after Transparency since it's a number value. Tables are also no refereed that way, you can see more about tables here: http://wiki.roblox.com/index.php?title=Table and math.functions here: http://wiki.roblox.com/index.php?title=Function_dump/Mathematical_functions#math.rad
trans = {0.1,0.2,0.3,0.4,0.5,0.6,0.7,0.8,0.9} while true do wait(1) script.Parent.Transparency = trans[math.random(1,9)] end
Dont forget to +1 :D