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

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

Asked by 8 years ago

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


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. NoahWillCode 370 — 8y
0
Why do people say no offense when your about to offend someone?? If you know can you please fix it? User#9821 0 — 8y

1 answer

Log in to vote
0
Answered by 8 years ago

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.

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? User#9821 0 — 8y
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. M39a9am3R 3210 — 8y
0
OK OK GAWD User#9821 0 — 8y
Ad

Answer this question