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

Please Help With this. How do I make a startercharacter team Character?

I've Tried already asking and the guy did not reply to "Why is LoadCharacter Not Working?"

I've Searched the whole site and I cannot find my answer, I've even tried asking my friend "ademyst" BTW the scripter of "HMM..." and hes on do not disturb at the moment on discord so its kinda hard to ask him. I really want to make a black ops type game instead Its SCP Black ops. I just cannot find a way to do it witch did not work

MY SCRIPT:

local player = game.Players.LocalPlayer

if player.Team == game.Teams.Chaos then game.Teams.Chaos.StarterCharacter:Clone().Parent = game.StarterPlayer end

( ITS A LOCALSCRIPT INSIDE OF STARTERCHARACTERSCRIPTS )

Please Fix the Script. I'm fairly newish to this type of scripting.

2 comments

0

You should do the character spawning all on the server. Just have a different character model for each team in ServerStorage or ReplicatedStorage, uncheck Players.CharacterAutoLoads and manually set the player's player.Character to a Clone of the model for their team, then parent it to Workspace..

0

LoadCharacter() is not needed, that's only for spawning a user's default Roblox avatar. A StarterCharacter should only be used when you want everyone to have the same character.

1 answer

local rs = game.ReplicatedStorage
local attack = rs.Attackers.StarterCharacter:Clone()
local defend = rs.Defenders.StarterCharacter:Clone()
local plr = game.Players.LocalPlayer

if plr.Team == game.Teams.defend then
	plr.Character:Remove()
	plr.Character = defend
	plr.Character.Parent = workspace
elseif plr.Team == game.Teams.attack then
	plr.Character:Remove()
	plr.Character = attack
	plr.Character.Parent = workspace
end

I Created this. it works, But It keeps respawning myself when I'm not dead :/

EDIT: Fixed. Forgot about the autocharacter load thing.

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