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

I made a script where it will say if a admin joined but it does not works plz help!?

Asked by 6 years ago

So i made a script where it will say if a admin joined but it does not work!

--admin joined game script

game.Players.PlayerAdded:connect(function(plr)
    if plr.leaderstats.Admin.Value == "YES" then
        game.StarterGui:SetCore("ChatMakeSystemMessage", {
            Text = "An admin has joined the game";
            Font = Enum.Font.SciFi;
            Color = Color3.new(255,0,0);
            FontSize = Enum.FontSize.Size96;
        })
    end
end)
0
Try using :WaitForChild(leaderstats) JackOfAllBlox 32 — 6y
0
What's the error? We need more information. Dog2puppy 168 — 6y
0
your leaderstats value must be wrong then. It has to be a StringValue if its holding a string, not an IntValue. It also possible that the value is "yes" rather than "Yes", Upper case and lower case matter stepatron 103 — 6y
0
you could've used a boolvalue fanofpixels 718 — 6y
0
I Checked but it doesn't work MahadTheIronSword 98 — 6y

1 answer

Log in to vote
1
Answered by 6 years ago

you could potentially be checking the value before it loads in, i would just put a wait() at the top, or:

while plr.leaderstats.Admin.Value == "" do wait() end
Ad

Answer this question