#How to make it chose 1 of the 3 parts

5 messages · Page 1 of 1 (latest)

snow musk
#

So I have this code and I am trying to make it when the countdown picks a number it will select 1 of the 3 parts and set it on fire

local fire1 = script.Parent.fire1
local fire2 = script.Parent.fire2
local fire3 = script.Parent.fire3
local time = wait(5)
local plot = math.random(fire1, fire2, fire3) -- This is where I wanted it to pick it randomly but I know math.random only takes numbers
wait(time)
print(plot)
script.Parent.Fire.Enabled = true
twilit compass
#
local plot = math.random(1,3) 
if plot == 1 then
     fire1.Fire.Enabled = true
elseif plot == 2 then
     fire2.Fire.Enabled = true
elseif plot == 3 then
     fire3.Fire.Enabled = true
end
print(plot)
#

@snow musk you may have to work with ends and stuff, but thats the base

snow musk
#

omg why didn't I think that!

#

Thank you so much mate