Hello,
I’m trying to make a custom character for each team, but it doesn’t seem to work with my character. I tried testing with a dummy and it worked perfectly fine. So what did I do wrong?
Script:
game.Players.PlayerAdded:Connect(function(player)
local character = player.Character or player.CharacterAdded:Wait()
local Team = game:GetService("Teams")
local Characters = game:GetService("ServerStorage"):WaitForChild("Characters")
if player.Team == Team.Red then
local oldModel = character
local oldCFrame = oldModel:GetPrimaryPartCFrame()
local newCharacter = Characters.Red:Clone()
newCharacter.Parent = workspace
--newCharacter:SetPrimaryPartCFrame(oldCFrame)
newCharacter.HumanoidRootPart.Position = character.HumanoidRootPart.Position
player.Character = newCharacter
elseif player.Team == Team.Blue then
print("Blue")
end
end)
This is a server script in server script service
When I spawn as the character I want:
How my character looks like:
What’s inside my character:
Thank you in advance.