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

How do I search for a Player and check their shirt?

Asked by
Sam4550 42
10 years ago

So when I type the Player's name into a TextBox and press the GO button, I want it to search to see if the string I typed in is the name of one of the users in the server. Then, I want it to check to see if it matches a shirt ID.

Does anybody know how to do this? It would really help! Thanks!

2 answers

Log in to vote
1
Answered by
ZeroBits 142
10 years ago

local play = game.Players:FindFirstChild(text) if play ~= nil and play.Character ~= nil then local shirt = play.Character.Shirt

voila You have now defined the player shirt. dont forget end statements.

Ad
Log in to vote
0
Answered by
Perci1 4988 Trusted Moderation Voter Community Moderator
10 years ago

This is NOT a request. Please include any coding or research you have already done.

Here are the things that you will need to research to make this work:

MouseButton1Click event

Changed event

If statements

FindFirstChild()

Repost if the code you attempt has errors that you need help with.

Answer this question