Hello,
I’m trying to make a custom character for each team. But, it doesn’t seem to be working
Script:
local Teams = game:GetService("Teams")
local Characters = game:GetService("ServerStorage"):WaitForChild("Characters")
local Character1 = Characters.1:WaitForChild("StarterCharacter"):Clone()
local Character2 = Characters.2:WaitForChild("StarterCharacter"):Clone()
game.Players.PlayerAdded:Connect(function(player)
player.CharacterAdded:Connect(function(character)
if player.Team == Teams.Red then
Red.Parent = workspace
Red:MoveTo(character:WaitForChild("HumanoidRootPart").Position)
character = Red
elseif player.Team == Teams.Blue then
Blue.Parent = workspace
Blue:MoveTo(character:WaitForChild("HumanoidRootPart").Position)
character = Blue
end
end)
end)
local teams = game:GetService("Teams")
local players = game:GetService("Players")
local Characters = game:GetService("ServerStorage"):WaitForChild("Characters")
players.PlayerAdded:Connect(function(player)
player.CharacterAdded:Connect(function(character)
if player.Team == teams.Red then
local Red = Characters:WaitForChild("1"):WaitForChild("StarterCharacter"):Clone()
Red.Parent = workspace
Red:MoveTo(character:WaitForChild("HumanoidRootPart").Position)
Red.Parent = character
elseif player.Team == teams.Blue then
local Blue = Characters:WaitForChild("2"):WaitForChild("StarterCharacter"):Clone()
Blue.Parent = workspace
Blue:MoveTo(character:WaitForChild("HumanoidRootPart").Position)
Blue.Parent = character
end
end)
end)
I believe this is what you’re trying to achieve, you may want to weld the StarterCharacter to the player’s character model.
It doesn’t seem to be making my character the model. It just clones the model to me and moves it to my character position. Even with welding it still has the same outcome.
After doing some testing. I realized my custom character is the problem. I tried using a dummy and it worked, but not my character. Any idea how to fix this?