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

Text wont visible when <0 or other way?

Don't have much to explain but it doesnt work as intneded. I wnat the text to be visible when the player has at least 1 or more money then the text is visible.

Stolen is the value of cash if you're confused with that

while wait(1) do
	script.Parent.Text = "$"..game.Players.LocalPlayer.stats.Stolen.Value
	if game.Players.LocalPlayer.stats.Stolen.Value == 0 then
		script.Parent.TextTransparency = 0
	elseif
		game.Players.LocalPlayer.stats.Stolen.Value <1 then
	
		script.Parent.TextTransparency = 1
	end
	end

1 answer

✓ Accepted answer

Your problem is that you are using the less than sign instead of greater than or equal to. Your code should look like this:

while wait(1) do
    script.Parent.Text = "$"..game.Players.LocalPlayer.stats.Stolen.Value
    if game.Players.LocalPlayer.stats.Stolen.Value == 0 then
        script.Parent.TextTransparency = 0
    elseif
        game.Players.LocalPlayer.stats.Stolen.Value >= 1 then

        script.Parent.TextTransparency = 1
    end
end

Line 6 now checks if the value is greater than or equal to 1 instead of if it is less than 1.

Hope that helped!

1 comment

0

Thanks!

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