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

Hi,i have a script that doesent work, can u help me?

Asked by
Gigaset39 111
3 years ago
Edited 3 years ago

when i play it, it keeps showing me Game Starting In , why? it doesnt continue?

 local black = script.Parent.Parent.Parent.Blk
 local platforms = {'Black','Blue','Green'}
 local blue = script.Parent.Parent.Parent.Blu
 local green = script.Parent.Parent.Parent.G

local choosenplatform = 'Nope'

while true do
    local game = Instance.new('Hint')
    game.Parent = script
    for i = 120,0, -1 do
    game.Text = 'Game Starting In: '
    wait(1)
    end
   game.Text = 'Get Ready'
   wait(5)
   game.Text = ''..choosenplatform[math.random(1,#platforms)]
   wait(4)
   if choosenplatform == 'Black' then
    blue.Transparency = 1
    blue.CanCollide = false

    green.Transparency = 1
    green.CanCollide = false



    wait(10)

    blue.Transparency = 0
    blue.CanCollide = true

    green.Transparency = 0
    green.CanCollide = true


end
game.Text = 'Get Ready'
wait(5)
game.Text = ''..choosenplatform[math.random(1,#platforms)]
wait(4)
if choosenplatform == 'Blue' then
    black.Transparency = 1
    black.CanCollide = false

    green.Transparency = 1
    green.CanCollide = false



    wait(10)

    black.Transparency = 0
    black.CanCollide = true

    green.Transparency = 0
    green.CanCollide = true


end
game.Text = 'Get Ready'
wait(5)
game.Text = ''..choosenplatform[math.random(1,#platforms)]
wait(4)
if choosenplatform == 'Green' then
    black.Transparency = 1
    black.CanCollide = false

    blue.Transparency = 1
    blue.CanCollide = false


    wait(10)

    black.Transparency = 0
    black.CanCollide = true

    blue.Transparency = 0
    blue.CanCollide = true


end

end

0
Its a Simon Says kind game. Gigaset39 111 — 3y

1 answer

Log in to vote
0
Answered by 3 years ago

On line 14 you've got an "end" which means you're loop will continue to go round between line 8 and 14, is this supposed to be like that?

0
let me see,No,its not suposed to be like that. Gigaset39 111 — 3y
0
ok so icheked,i really dont know..if i remove it,it doesent work.. Gigaset39 111 — 3y
0
hmm, that must mean the script isnt working in itself what does the output say? WeaponisedPenguins 97 — 3y
0
can u explain to me what the ” i ” from line 11 means? :D Gigaset39 111 — 3y
1
if you wrote the script how do you not know? WeaponisedPenguins 97 — 3y
Ad

Answer this question