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"

01while true do
02    wait()
03    local plr = game:GetService("Players").LocalPlayer
04    local coin = plr.PlayerGui.Value.Frame.TextLabel.Bronze
05    local coin2 = plr.PlayerGui.Value.Frame.TextLabel.Silver
06    local coin3 = plr.PlayerGui.Value.Frame.TextLabel.Gold
07    local label = plr.PlayerGui.Value.Frame.TextLabel
08    local Bronze = plr.leaderstats.Bronze.Value
09    local Silver = plr.leaderstats.Silver.Value
10    local Gold = plr.leaderstats.Gold.Value
11    label.Text = Bronze
12 
13        if Bronze >= 100 then
14            coin.Visible = false
15            coin2.Visible = true
View all 21 lines...

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:

01repeat wait() until game.Players.LocalPlayer
02local plr = game:GetService("Players").LocalPlayer
03 
04while wait() do
05    local coin = script.Parent.TextLabel.Bronze
06    local coin2 = script.Parent.TextLabel.Silver
07    local coin3 = script.Parent.TextLabel.Gold
08    local label = script.Parent.TextLabel
09    local Bronze = plr.leaderstats.Bronze
10    local Silver = plr.leaderstats.Silver
11    local Gold = plr.leaderstats.Gold
12    label.Text = tostring(Bronze.Value)
13        if Bronze.Value >= 100 then
14            coin.Visible = false
15            coin2.Visible = true
View all 21 lines...
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