How to make auto armor (model) depending on the team?

Depending on the team, I’d like to know how to get them to wear armor (Model) automatically

1 Like

Check for the Player.Team.Name, then if its the right thing, insert the armour in their character

2 Likes

But I don’t know how to check when a user joined, and how to make the user wear it again when the user respawned.

1 Like

https://developer.roblox.com/en-us/api-reference/class/Players

2 Likes

I still don’t know xd, Just I need help about scripting.

1 Like

I’d recommend first getting into the basics, so you can understand things like loops, instances, events, if/else statements, before you try scripting things

1 Like

It is solved to automatically provide armor when joining server or respawning But I don’t know how to check the team name and put it on.

1 Like

Is need I use If player.team.name == “name” then
~~ etc ?

1 Like

You could do something like this

game.Players.PlayerAdded:Connect(function(plr)) -- gets the player and detects when player joins
plr.CharacterAdded:Connect(function(char)) --detects when a player spawns in game and gets the character
local CharacterTeam = plr.Team
if CharacterTeam == " " then -- whatever team name
--scripts here
elseif CharacterTeam == "" then do-- whatever team
--scripts here
end
end)
end)

It shld work fine

2 Likes

Also, local CharacterTeam = plr.Team Should be plr.Team.Name or It’s not works, so I fixed it.

3 Likes

yeah something like that sorry,didnt test it out in roblox studio glad it worked!

2 Likes