Ad
Still have questions? Join our Discord server and get real time help.
Log in to vote
0

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

Asked by 2 months ago

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

1 answer

Log in to vote
0
Answered by
Feahren 5485 Moderation Voter Community Moderator
2 months ago
Edited 2 months 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 — 2mo
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. Feahren 5485 — 2mo
1
Thanks, and ill look harder next time. ExCaliberDen 3 — 2mo
Ad

Answer this question