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

Why is this not setting bool value to true, VERY SIMPLE QUESTION?

Asked by 9 years ago
function player_addition(Plyr)
coroutine.wrap(function()
Plyr.PlayerGui.L_Data:WaitForChild("Loading_01") 
Plyr.PlayerGui.L_Data.Loading_01.Value = true <--This is where it doesn't set.
print("Booly")
Plyr.CharacterAdded:connect(function(Character)
Plyr:WaitForChild("PlayerGui")
Plyr.PlayerGui:WaitForChild("Menu")
repeat wait() until Plyr.Character
if Plyr.PlayerGui.L_Data.Loading_01.Value == true then
game.ReplicatedStorage.Loading_Gui:clone().Parent = Plyr.PlayerGui
else
wait(.1)
end
if Plyr.PlayerGui.Loading_Gui then
print("Found Loading_Gui.")
elseif Plyr.PlayerGui.L_Data.Loading_01.Value == true and Plyr.PlayerGui.Loading_Gui == nil then
game.ReplicatedStorage.Loading_Gui:clone().Parent = Plyr.PlayerGui
end
Character.Humanoid.Died:connect(function()
print("I have performed this check")
if Plyr.PlayerGui.L_Data.Loading_01.Value == false then
wait(1)
elseif Plyr.PlayerGui.L_Data.Loading_01.Value == true then
repeat wait() until Plyr.Character and Plyr.Character.Humanoid.Health >= 5
Plyr:WaitForChild("PlayerGui")
game.ReplicatedStorage.Loading_Gui:clone().Parent = Plyr.PlayerGui
end
print("I have performed this check")
if Plyr.PlayerGui.Loading_Gui and Plyr.PlayerGui.L_Data.Loading_01.Value == false then
print("I have found Loading_Gui.")
elseif Plyr.PlayerGui.Loading_Gui and Plyr.PlayerGui.L_Data.Loading_01.Value == true then
game.ReplicatedStorage.Loading_Gui:clone().Parent = Plyr.PlayerGui
end
end)
end)
end)()
end

There is no ERROR on the script, NOTHING. But it does not set the Bool Value to be true, why is that?

0
What is calling `player_addition`? BlueTaslem 18071 — 9y
0
Woops, I added a :connect line now. Now it says L_Data is not a member of PlayerGui, how can I fix that? Overpride 0 — 9y

Answer this question