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

Unknown Error! No output info or Dev Console Info?

My code is supposed to do this: Basically a person's leaderstat value is 'Suspended" or "Valued customer" it wouldn't show a GUI but people who's ranks are FALSE to those will have a GUI shown up, for some reason it's just not working, nothing is happening and in output there is nothing. (THIS IS A LOCAL SCRIPT)

local plr = game.Players.LocalPlayer
local leaderstats = plr:WaitForChild('leaderstats', 1).Rank


if leaderstats.Value == ("1 | Valued Customer") or not leaderstats.Value == ("2 | Suspended") then
    plr.PlayerGui.Guidelines.Enabled = true
end

2 comments

0

No error in output means it's doing what it's supposed to

0

Is the value of "Rank" "1 | Valued Customer" or just "Valued Customer"? (You say the latter but your script says the former.) Either way, put print(leaderstats.Value) on line 4 to see what's going on (and maybe a print statement inside the 'if', too)

1 answer

if leaderstats.Value == ("1 | Valued Customer") and leaderstats.Value ~= ("2 | Suspended") then
plr.PlayerGui.Guidelines.Enabled = true

I'm not even sure if ('leaderstats', 1) will work, and I might have to take a look at the script that changes your Rank.

make sure that it's a stringvalue and not a intvalue et cetera.

If you want to make it to only appear for all ranks besides Suspended, you can try;

if leaderstats.Value ~= ("2 | Suspended") then
plr.PlayerGui.Guidelines.Enabled = true

http://wiki.roblox.com/index.php?title=Conditional_statement

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