My gui doesn't go to visible after i set it to true any help? LFrame is the frame there are no errors in the output (that may be because its studio) but i've tried it in real game and it still doesnt work
this is the Load button clicked:
function loadScore(plyr, clickCounter)
local score = plyr:LoadNumber("Stage")
if not score == 0 then
clickCounter.Value = score
else
print("Nothing to load../..score was 0")
end
end
function onClicked(Player)
local player = script.Parent.Parent.Parent.Parent.Parent
player:WaitForDataReady()
if player.DataReady == true then
loadScore(player, player.leaderstats:findFirstChild(script.Parent.Parent.Parent.Configuration.Type.Value))
player.leaderstats:findFirstChild(script.Parent.Parent.Parent.Configuration.Type.Value).Value = player:LoadNumber("Stage")
local m = player.PlayerGui.Loading.LFrame
m.Visible = true
player.Character.Humanoid.Health = 0
wait(3)
m.Visible = false
else
local mes = Instance.new("Message",player.PlayerGui)
mes.Text = "Wait until DataReady!"
game:service("Debris"):AddItem(mes, 3)
end
end
script.Parent.MouseButton1Click:connect(onClicked)
and this is the save button clicked:
function loadScore(plyr, clickCounter)
local score = plyr:LoadNumber("Stage")
if not score == 0 then
clickCounter.Value = score
else
print("Nothing to load../..score was 0")
end
end
function onClicked(Player)
local player = script.Parent.Parent.Parent.Parent.Parent
player:WaitForDataReady()
if player.DataReady == true then
loadScore(player, player.leaderstats:findFirstChild(script.Parent.Parent.Parent.Configuration.Type.Value))
player.leaderstats:findFirstChild(script.Parent.Parent.Parent.Configuration.Type.Value).Value = player:LoadNumber("Stage")
local m = player.PlayerGui.Saving.SFrame
m.Visible = true
player.Character.Humanoid.Health = 0
wait(3)
m.Visible = false
else
local mes = Instance.new("Message",player.PlayerGui)
mes.Text = "Wait until DataReady!"
game:service("Debris"):AddItem(mes, 3)
end
end
script.Parent.MouseButton1Click:connect(onClicked)

1 comment
it still didn't work... i'll post my full code real quick