Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

random colored shirt script not working?

Asked by
Rdumb1 4
4 years ago

I am testing stuff with an npc, it has a shirt and pants. Now I tried doing a random shirt color script but didn't work since watching lua tutorial will be forgettable (including the wiki).

the title says it all.

script:

script.Parent.Shirt.Color3 = math.random(23,73,154, 170,0,0)

1 answer

Log in to vote
1
Answered by 4 years ago

You need to use Color3.new() not just math.random()

Example:

script.Parent.Shirt.Color3 = Color3.new(123, 123, 123) -- you can substitute your random values here
Ad

Answer this question