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

Why won't this work?

Asked by 10 years ago

while true do wait() local good = false for _,v in pairs(game.Players:GetChildren()) do alive = v:FindFirstChild("Alive") if v.Alive.Value == true then if v.Name ~= game.Workspace.GameScript.ChosenValue.Value then if alive.Value == true then good = true script.Parent.Game.Value = true elseif good == false then script.Parent.Game.Value = false end end end end end

The objective of this is to change the value of the game if all the players die. This script is located in the main game script, but when the game starts, it automatically ends even if there are players alive. (NOTE: The code isn't directly inside the main script, the main script opens up and there are multiple scripts and values)

1
Organize your code please. TheGuyWithAShortName 673 — 10y

1 answer

Log in to vote
0
Answered by 10 years ago

Can you make it so that it is in script form?

0
It is georgeba 0 — 10y
0
no but so it is more readable. Go Edit Then click on the little blue circle that syas LUA. Then it will give you 2 lines of "~" Put your script inbetween those NinjoOnline 1146 — 10y
Ad

Answer this question