i would like to teambind this. so if someone joined a team it would run this script please help im losing my mind. Basically want I want is like if player is on a certain team it will run the script.
e.g if player is on team”red” then Run script End)
local User = script:WaitForChild("Username")
local Rank = script:WaitForChild("Rank")
local Regiment = script:WaitForChild("Regiment")
game.Players.PlayerAdded:connect(function(Player)
Player.CharacterAdded:connect(function(Character)
spawn(function()
wait(.8)
local c = User:clone()
local a = Rank:clone()
local b = Regiment:clone()
a.Adornee = Character:WaitForChild("Head")
a.TextLabel.Text = Player:GetRoleInGroup(4887489)
a.Enabled = true
a.Parent = Character
b.Adornee = Character:WaitForChild("Head")
b.TextLabel.Text = Player:GetRoleInGroup(9959171)
b.TextLabel.TextColor3 = (Player.TeamColor.Color)
b.Enabled = true
b.Parent = Character
c.Adornee = Character:WaitForChild("Head")
c.TextLabel.TextColor3 = (Player.TeamColor.Color)
c.TextLabel.Text = Player.Name
c.Enabled = true
c.Parent = Character
Character:WaitForChild('Humanoid').NameOcclusion = Enum.NameOcclusion.OccludeAll
local h = Character.Head:Clone()
local m = Instance.new('Model',Character)
m.Name = 'NameTag'
h.Parent = m
Character.Head:WaitForChild('face'):Destroy()
Character.Head.Transparency = 1
local w = Instance.new('Weld',Character.Head)
w.Part0, w.Part1 = Character.Head, h
end)
end)
end)

1 comment
And the first answer didn’t work all it does is say that I’m a guest on both groups