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

Unknown Error! No output info or Dev Console Info?

Asked by
F_0xie 0
7 years ago

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
0
No error in output means it's doing what it's supposed to Ethan_Waike 156 — 7y
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) chess123mate 5873 — 7y

1 answer

Log in to vote
0
Answered by
Astralyst 389 Moderation Voter
7 years ago
Edited 7 years ago
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

Ad

Answer this question