So, I have been trying to make it work, but it didn't work. This is my code below. Basically, I have a part when the player touches the part. The script inside the part where they change the player's team. It didn't work.
local part = script.Parent
part.Touched:Connect(function(hit)
if hit.Parent then
local human = hit.Parent:FindFirstChild("Humanoid")
if human then
print("Changed Player's Team")
SetTeam(human,"LevelTwo")
end
end
end)
function SetTeam(player, teamName)
player.TeamColor = game.Teams[teamName].TeamColor
if player.Character then
player.Character:BreakJoints()
end
end

3 comments
There is an error with IF Statement or at line: 5
yea, i sorted that out
sorry about that