Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

Why won't this work?

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 comment

1

Organize your code please.

1 answer

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

2 comments

0

It is

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

This discussion is preserved as it was. New answers, comments, and votes are closed.