im trying to make a script that changes player body to a "monster like" depending on the race, there is 4 of these monsters, each one with a specific body, i did it with a ServerScript and doing this:
if race.Value == "hollow" then
local newChar = hollow:Clone()
newChar.Name = plr.Name
newChar.Parent = W
newChar.PrimaryPart = newChar.HumanoidRootPart
newChar.PrimaryPart.CFrame = plr.Character.PrimaryPart.CFrame
plr.Character = newChar
game.ReplicatedStorage:WaitForChild("CameraFix"):FireClient(plr)
end
its the best way? make in a ServerScript and do all these things or theres a way to just change the player "StarterCharacter"? i think in a LocaScript, something like "if your race is X, ill clone the X body in your StarterPlayer and rename it StarterCharacter" what u guys think about it?

3 comments
i need those "if race.Value == this then do this", because its 4 monsters and each one is for a specific level and have specific body, so i cant just do "race~=nil" and make 1 morph, this is not what i want, and "hollow" in my script is already in ReplicatedStorage
Totally, but if you do race.Value ~= nil, then you already know what their monster is because you have race.Value instead of running if-statements. So you could just use race.Value to find the morph out of the 4 in replicated storage. On Line 2 of the code I put, that would find the specific morph out of the 4.
Just a suggestion though to make code neater, whatever's easiest for you.