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

[[Solved]by RobloxWhizYT]why cant i get the user id from the script?

Asked by
Fad99 286 Moderation Voter
5 years ago
Edited 5 years ago

im trying to learn in pairs loops, and whenever i want to get a player id this message pops up :

ServerScriptService.Script:21: attempt to concatenate local 'v' (a userdata value)

what i think is happening is the userid not coming out as a string but im not sure

My code:

 game.Players:WaitForChild("fad99")
wait(3)
local getPlayerName = game.Players:GetChildren()



for i,v in pairs(getPlayerName) do
    print(i.."Times")

    print(v.."'s UserId is "..v.UserId)

    wait()

    if v.Name == "fad99" then
        print("Owner")
    end
end
0
v.Name instead of v DeceptiveCaster 3761 — 5y
0
Thanks, im just dumb Fad99 286 — 5y

Answer this question