Hello from Romania, is there a way to shorten a script?
local Dice = math.random(1,3)
hint.Value = '3'
wait(0.9)
hint.Value = '2'
wait(0.9)
hint.Value = '1'
wait(0.9)
if Dice == 1 then
P.CanCollide = false
end
if Dice == 2 then
P.CanCollide = false
end
if Dice == 3 then
P.CanCollide = false
end
end
Now, let say i want to do that to happen 6 more times, i could copy & paste,right? ,but let say im too lazy, what then? is there a way to shorten this out? i tryed to do:
Local Game1 = local Dice = math.random(1,3)
hint.Value = '3'
wait(0.9)
hint.Value = '2'
wait(0.9)
hint.Value = '1'
wait(0.9)
if Dice == 1 then
P.CanCollide = false
end
Basicaly, i tryed to make a word mean a entire script. but it doesent work, it wold be cool tought. :D :D :D

4 comments
hi, could u edit and add more explanations? just if you want.
just to the 2 ex.
just to the 2 ex.
im not the best at explaining things, if theres a specific part you didn't understand let me know and ill try to explain it, otherwise i did add a few comments which hopefully helps