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

why isnt gui going visible and going not visible?

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

4 comments

0

You should include a screenshot of the structure, fully expanded, so we can see what all these things are.

0

uhhh u could see what they are on the script if you arent to lazy to read lmao

0

no we can't see, there could easily be a problem with the hierarchy

1 answer

✓ Accepted answer

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

4 comments

0

nope visible isnt changing

0

Hey, remember to change values with server. not in client.

0

I edited now i found one error.

0

nvm i fixed it it was bcz of my other script thx for the help :)

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