So i was trying to create a custom spawning system as i will later need it since respawning will not be as regular respawning, upon spawning the character the roblox default Animate script didn’t work, despite running all the way through, the other character scripts work fine
And no i can’t use LoadCharacterWithHumanoidDescription
because my character use Meshes that i made instead of accesories in the roblox catalog
I have attempted to search Devforum for people having same problems but i could not find anything
After that, you should include more details if you have any. Try to make your topic as descriptive as possible, so that it’s easier for people to help you!
--Server script
local players=game:GetService("Players")
local replicatedStorage=game:GetService("ReplicatedStorage")
local defaultData={
["Character"]="Private1"
}
--Will later be moved to DataStores
local Data={}
local function LoadCharacter(player,Char:Model)
Char.Name=player.Name
Char.PrimaryPart.Position=workspace.SpawnLocation.Position+Vector3.new(0,Char:GetExtentsSize().Y,0)
player.Character=Char
--I have a copy of the Animate script there because they don't auto replicate
for _,Script in pairs(game.StarterPlayer.StarterCharacterScripts:GetChildren()) do
Script:Clone().Parent=Char
end
Char.Parent=workspace
end
players.PlayerAdded:Connect(function(player)
Data[player.Name]=defaultData
local character=(Data[player.Name]["Character"] or replicatedStorage.Characters.Private1):Clone()
LoadCharacter(player,character)
end)
No modifications were made to the Animate script other than some prints and setting the Character and Humanoid when Player.CharacterAdded
fires
Of course i can make my own Animate script but i wanted to avoid the hustle and use Roblox’s default animations.
The characters:
They’re made of 100% meshes (Minus HumanoidRootPart)