How do I get a script to check all players when a button is clicked, to check for a specific player and use their name (or Character ID) for access?
COMMUNITY QUESTION
How Do I Get A Script To Check For A Certain Player?
1 answer
basic script for that
local userid = 1 --userid of whoever you want to check
Button.MouseButton1Down:connect(function()
for _, Player in next, game:GetService("Players"):GetChildren() do
if Player.UserId == userid then
--your code
end
end
end)
you could modify it to work with whatever you need it to
This discussion is preserved as it was. New answers, comments, and votes are closed.

2 comments
My post have been banned a few times accidently asking questions making others do the work so i would suggest you should probably do some research and get some basic script down so you don't get flagged
ye this isnt a request site its one of the rules. your question could probably answered easily on youtubw or another site