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

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

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)

5 comments

0

Try using :WaitForChild(leaderstats)

0

What's the error? We need more information.

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

0

you could've used a boolvalue

0

I Checked but it doesn't work

1 answer

✓ Accepted answer

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

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