Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

Script won't detect that player's team has changed?

local translate = {
	["yak"]=1234,
	["test"]=4786801
}

game.Players.PlayerAdded:Connect(function(p)
	p.CharacterAdded:Connect(function(char)
		game.ServerStorage.Rank:Clone().Parent = char.Head
		char.Humanoid.DisplayDistanceType = "None"
		char.Head.Rank.RankFrame.NameRank.Text = p.Name.." | "..p:GetRoleInGroup(2313233)
		char.Head.Rank.RankFrame.DepartmentRank.Text = p.Team.Name.." | "..p:GetRoleInGroup(translate[p.Team.Name])
		char.Head.Rank.RankFrame.DepartmentRank.TextColor3 = p.Team.TeamColor.Color	
	end)
end)

If I print the player's team over and over it still does not say it has changed, no idea why this would be as it works in another similar script. It's always worked in the past. Hoping someone can shed some light on this

1 answer

Turns out it was because I was in studio :facepalm:

This discussion is preserved as it was. New answers, comments, and votes are closed.