Hello there! I don't know how to make a uniform in game, like when you click on it you'll get the uniform. Does anybody know how?
How do I make a uniform in a game? I really need help!
2 answers
Use a ClickDetector. The MouseClick event is the one you are looking for. Then, change the Shirt and Pants accordingly.
1 comment
Would work, but this person cannot script..
First create a part which is going to give the uniform to players. Then create a ClickDetector and parent it to the part.
Then make a script (a normal script, not localscript) that is going to handle the clothing change, like this:
local clickDetector = script.Parent
local clothing = {
["Shirt"] = 123, --replace with the shirt id
["Pants"] = 123, --replace with the pants id
}
clickDetector.MouseClick:Connect(function(plr)
local char = plr.Character
for i,v in pairs(clothing) do
local c = char:FindFirstChildOfClass(i) or Instance.new(i, char)
c[i .. "Template"] = v
end
end)
3 comments
Why are you even helping a person who does not even try to make a good question and cannot script
^ I mean, Kiriot is probably trying to be nice to her since she was getting some unhelpful answers, but more of us would help if she would at least make some effort to do this.
^ Could be, I always try to help if people put effort in their questions, but he/she isn't a scripter or took effort to make the question/did any research
This discussion is preserved as it was. New answers, comments, and votes are closed.

3 comments
For anybody seeing this question, do not moderate it. This kid's got a good point. I'll downvote any moderations.
Just change the templateId from the shirt and pants inside the character?
Gonna moderate as the answers are here and he/she is still not marking anything as answered