Custom Characters doesn't work due to new custom character not taking on the regular character properties

So I have this issue in my game where said simply, the character for some reason won’t be animated or have a health script. I have been told that when making a new character, it will gain those things, but for me that hasn’t been the case.

CharacterAutoLoads is disabled since my game has a main menu and I don’t want the player to initially load in, So technically there isn’t a previous character before it gets set. Here is my script:

local ReplicatedStorage = game:GetService("ReplicatedStorage")
local baseCharacter = ReplicatedStorage.BaseCharacter
local events = ReplicatedStorage:WaitForChild("Events")
local LoadCharacterEvent = events:WaitForChild("LoadCharacterEvent")

LoadCharacterEvent.OnServerEvent:Connect(function(player: Player)
	local newCharacter = baseCharacter:Clone()
	newCharacter.Name = player.Name
	newCharacter.Parent = workspace
	player.Character = newCharacter
end)

The event is called when the player presses the play button. Here is a video of me showcasing the bug. As I said before, everything but some stuff like animations and health are working, its just those things that are crucial for my game.

Any possible tips would be appreciated, although I don’t want to hardcode implementing animations and the health script. I want to get the character right.

Your base character needs to have those scripts in it beforehand, since they aren’t just added to the character that you made and loaded yourself. Just go into play mode with normal character loading, copy the Animate and Health script and paste them into your base character.

The health script works, but the animate still doesn’t seem to do anything.

IIRC, there is some weird behaviour here and there with localscripts. I’m not sure if this’ll help, but try setting the Character of the player before you parent the character to workspace.

And if this doesn’t work, try disabling and then enabling the animate script after you’ve set the parent (just in case with a tiny wait before re-enabling). And if this doesn’t work either, you could try to manually clone the animate script and drop it in the character.

1 Like

Hey! To my surprise, the character before it parented actually worked! Although I still have to manually keep in the health script. I wish it automatically did that.

1 Like

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.