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

(SOLVED)Script giving a output error in the game, but dont gives error in the studio when testing?

Asked by 5 years ago
Edited 5 years ago

EDIT -I was supposed to use math.random(1,2) instead of (0,1), one scripter said me this.(Not the one who commented that i should 1,2) Hello, so my problem is the script, which gives error in game, but don`t gives it in the studio I dont know, what makes it happen. Heres the screenshot(first from game, second from studio.) https://imgur.com/a/s2K9n2n

x = math.random(0,1)
print(x)
if x ==1 then
wait(60)
game.Workspace.pep.Sound.Playing = false
game.Workspace.ovo.Playing = true
wait(17)
game.Workspace.ede.Transparency = 1
wait(5)
game.Workspace.ede.Transparency = 0
game.Workspace.ovo.Playing = false
wait(1)
game.Workspace.pep.Playing = true
end

Thats all.

0
maybe storing it in local variable would fix it 'local x = math.random(0,1)' NickAtNick 163 — 5y
0
Thanks for trying help me, but that didn`t work. mariofl2003 11 — 5y
0
Try using math.random(1,2) xg1y 41 — 5y
0
Oof i thought I was wrong, yet I got it right :shrug: xg1y 41 — 5y

Answer this question