I need it for my game, so that the Developers can get Extra Features, This would be used in order so a Hacker can not access The Devs features Easily, But The Problem Is I dont know how, Any help in a script or something would be helpful.
COMMUNITY QUESTION
How to make a game sense a Users Player ID?
1 answer
Hello. Your request is simple and easy. First way is, if you are using a PlayerAdded function you can do:
game.Players.PlayerAdded:connect(function(player)
local playerid = player.userId
end)
or, another way is with a LocalScript... You can do: local playerid = game.Players.LocalPlayer.userId
I hope this answered your question!
For your "Dev Features", you can change their names in the script to their IDs and then where your script says something of the sort as player.Name you can change to player.userId.
This discussion is preserved as it was. New answers, comments, and votes are closed.

3 comments
I will try this out.
The problem with using a LocalScript to determine whether the player is an admin or not is that exploiters can modify their ID locally and fool your admin script.
When did that become a thing? ROBLOX needs to patch that! userId property is ROBLOXLocked meaning it isn't accessible by script or LocalScript.