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

why isnt gui going visible and going not visible?

Asked by
tacotown2 119
6 years ago
Edited 6 years ago

im probs just overlooking something but coin isnt going false and coin1 isnt going true same problem with coin2 going false and coin 3 going true i need the while true do for the "label.text = bronze"

while true do
    wait()
    local plr = game:GetService("Players").LocalPlayer
    local coin = plr.PlayerGui.Value.Frame.TextLabel.Bronze
    local coin2 = plr.PlayerGui.Value.Frame.TextLabel.Silver
    local coin3 = plr.PlayerGui.Value.Frame.TextLabel.Gold
    local label = plr.PlayerGui.Value.Frame.TextLabel
    local Bronze = plr.leaderstats.Bronze.Value
    local Silver = plr.leaderstats.Silver.Value
    local Gold = plr.leaderstats.Gold.Value
    label.Text = Bronze

        if Bronze >= 100 then
            coin.Visible = false
            coin2.Visible = true
            if Silver >= 100 then
                coin2.Visible = false
                coin3.Visible = true
            end
        end
    end

https://cdn.discordapp.com/attachments/487247357742940163/511624820006584330/unknown.png

0
You should include a screenshot of the structure, fully expanded, so we can see what all these things are. EmilyBendsSpace 1025 — 6y
0
uhhh u could see what they are on the script if you arent to lazy to read lmao tacotown2 119 — 6y
0
no we can't see, there could easily be a problem with the hierarchy xEmmalyx 285 — 6y

1 answer

Log in to vote
0
Answered by
yHasteeD 1819 Moderation Voter
6 years ago
Edited 6 years ago

You cannot use .Value in variable.

Put a local script in your frame

Try to use it:

repeat wait() until game.Players.LocalPlayer
local plr = game:GetService("Players").LocalPlayer

while wait() do
    local coin = script.Parent.TextLabel.Bronze
    local coin2 = script.Parent.TextLabel.Silver
    local coin3 = script.Parent.TextLabel.Gold
    local label = script.Parent.TextLabel
    local Bronze = plr.leaderstats.Bronze
    local Silver = plr.leaderstats.Silver
    local Gold = plr.leaderstats.Gold
    label.Text = tostring(Bronze.Value)
        if Bronze.Value >= 100 then
            coin.Visible = false
            coin2.Visible = true
        if Silver.Value >= 100 then
            coin2.Visible = false
            coin3.Visible = true
        end
    end
end
0
nope visible isnt changing tacotown2 119 — 6y
0
Hey, remember to change values with server. not in client. yHasteeD 1819 — 6y
0
I edited now i found one error. yHasteeD 1819 — 6y
0
nvm i fixed it it was bcz of my other script thx for the help :) tacotown2 119 — 6y
Ad

Answer this question