When a player in a group touches the model they get the clothes but the clothes change with the rank of the player? Example: if a private touch the model he/she get the private uniform. If a sergeant touches the same model he/she get the sergeant uniform.
COMMUNITY QUESTION
How do i make a model with a script that give you clothings?
1 answer
Use the touched Event first to check when a player has touched the brick. From there use the player.IsInGroup(GROUPIDHERE) to check if the player is in a group with an If statement. After that use the player.GetRankInGroup(GROUPIDHERE) in an if statement to check if their rank is equal to the rank you want the clothes on.
For example:
script.Parent.Touched:Connect(function(hit)
local player = hit.Parent
if game.Players:FindFirstChild(player.Name) then
if player.IsInGrroup(1) then
if player.GetRankInGroup(1) == 255 then
--GIVE CLOTHES HERE
end
end
end
end)
This discussion is preserved as it was. New answers, comments, and votes are closed.

2 comments
Hey listen, scriptinghelpers is a help website and doesn't do requests...you will need to attempt to script this before people choose to help you, read more here before reposting https://scriptinghelpers.org/help/how-post-good-questions-answers
i can work for u plz