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

How would I fix userId?

script.Parent.Text = (game.Players.LocalPlayer.Name.. "'s UserID is ".. game.Players.LocalPlayer.FollowUserId)

The text is supposed to say your name, and your Id, but it tells you your ID is 0 any help?

1 answer

✓ Accepted answer

The property you're attempting to concatenate will always be 0 unless the user in question followed another user into the game, in which case the property will be equal to the userId of whoever they followed.

You should be 'reading' the userId property to get their userId.

http://wiki.roblox.com/index.php?title=UserId

local Player = game.Players.LocalPlayer
script.Parent.Text = Player.Name .. "'s UserID is " .. Player.userId

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