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

How do i make a script that finds the id of the player that has joined?

Asked by 4 years ago

oof i can't find this any were so please help out.

1 answer

Log in to vote
0
Answered by
Ziffixture 6913 Moderation Voter Community Moderator
4 years ago
Edited 4 years ago

You've really got to try harder to research your topic. I found it quickly using your title in fractions, both as a first result:

Player.UserId | Players.PlayerAdded

local players = game:GetService("Players")

players.PlayerAdded:Connect(function(player)
    local userId = player.UserId
    print(userId)
end)
0
oof is it a local script? ExCaliberDen 3 — 4y
0
Generally both, but usually a ServerScript in this manner; it ultimately depends on what you wish to do with the ID, as both have limitations. Ziffixture 6913 — 4y
1
Thanks, and ill look harder next time. ExCaliberDen 3 — 4y
Ad

Answer this question