Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

[Solved] Why aren't animations replicating with my custom character?

Asked by 5 years ago
Edited 5 years ago

Hi, so I'm trying to make something that allows someone to have an r6 hitbox, while keeping their R15 appearance and animations. To do this, I've made their character R6, made them invisible, made a copy of what their actual R15 character should look like, welded their root parts together, and put the R15 rig inside of their character (as a child), and finally I modified the animation script so it would play the animations on the fake r15 character instead. The modified animation script is too long to post here, but the server-side script isn't too long.

01local function newchar(plr)
02    local uid = plr.UserId
03    local charinfo = game:GetService("Players"):GetCharacterAppearanceInfoAsync(uid)
04    local avatartype = charinfo.playerAvatarType
05 
06    if avatartype == "R6" then
07        plr:LoadCharacter()
08        if not plr.Character then
09            plr.CharacterAdded:Wait()
10        end
11        local connection
12        connection = plr.Character:WaitForChild("Humanoid").Died:Connect(function()
13            connection:Disconnect()
14            newchar(plr)
15        end)
View all 66 lines...

the place is here by the way (it's uncopylocked so you can view it in studio).

oh also I'm just looking for any suggestions on what I could try in order to fix it.

Thanks

1 answer

Log in to vote
0
Answered by 5 years ago

Nobody else will likely see this, but I might aswell answer my question. I've found out that inorder for an animation to be displayed, an animator must be inside of the humanoid. If a script tries to load an animation without it, it creates one inside of the humanoid. It should be well known that if a local script tries to create this animator, it won't be replicated to the server and therefore there won't be an animation displayed to other players. The solution is to create an animator from the server before trying to animate from the client.

Ad

Answer this question