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

How would I get the players Id in-game by saying a command?

Can the command be :Id (player name)

I have this so far but I don't know why it won't work.I also don't know how to add a part so that if I say :Id (player name) it will give me there Id.Also I want it to only work for certain people.

while true do
wait(1)
g = game.NetworkServer:GetChildren()
for i = 1,#g do 
print(g[i].Name) -- g[i].Name is the ip... this is good for banning people by ip.
end 
end


2 comments

0

No offense. But you seem to not have a deep enough understanding of how coding works much at all here. Good try!! But not quite. I suggest learning about events. There was a post in the blog on this site about them earlier this summer.

0

Why do people say no offense when your about to offend someone?? If you know can you please fix it?

1 answer

Check out the Chat commands on the Roblox wiki and edit it to your own use. The way to get a persons Id is player.UserId.

3 comments

0

I don't get it can you just make it? I'll learn from that because I tried to make it but it didn't work?

0

"I don't get it can you just make it?" We're not a request site. That type of attitude will get your posts downvoted and locked on this site. We're willing to help if you put in the effort. You can not get a player's UserId from the NetworkServer, you can get it from the physical player. However, and I will state it once more, you can not make an IP ban with user created scripts.

0

OK OK GAWD

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