#Morph Animations not sending to server

1 messages · Page 1 of 1 (latest)

tardy ermine
#

Having an issue where the animations of the morph script i'm using only apply to the client and don't get sent to the server

Originally I thought it was because the "Animate" script in both was a LocalScript, but if that was the issue, why does the original player model's animate script work perfectly fine but not the morph's animate script?

tardy ermine
#

"MorphScript"

tardy ermine
#

The fact it works perfectly fine clientside implies the animations are working correctly, they're just not being synced with the server

tardy ermine
#

Maybe part of the problem is I send the "PlayerModelChanger" event through a localscript first instead of it being entirely server-sided?

burnt scarab
#

when you end up with your character and manually swap it the client isn't allowed to push those join transforms back out to everyone unlike the previous player model

#

humanoids under the player character normally replicatates the animations for you but the problem is it is simply not allowed to

tardy ermine
#

Got it, so the problem is how do I give the new model permissions to give its animations to the server?

burnt scarab
#

you can try BasePart:SerNetworkOwner

#

might work lol

#

create a for loop and traverse through you NewChar:GetDescendants() and if part:IsA("BasePart") then
part:SetNetworkOwner(player)

#

sry should I format that

tardy ermine
#

Like this?

mellow chasmBOT
#

studio** You are now Level 3! **studio

burnt scarab
#

yeah looks right

tardy ermine
#

Whatever I wrote didn't fix the issue, seems to add an immense amount of input delay as well

burnt scarab
#

you must not be traversing through the Get:Descendants correctly

#

print in the for loop to test

tardy ermine
#

Decided to print the desend array itself, its 72 long

burnt scarab
#

print in the for loop

tardy ermine
#

Putting the print inside the loop does seem to show good results

burnt scarab
#

oh

#

oh wait

#

you have to set the player

#

descend:SetNetworkOwner(player)

#

typically when you get these invisible errors you want to look for any inheriented functions or whatever they are called when you use " : "

tardy ermine
#

not lagging anymore, good sign

burnt scarab
#

did it work?

tardy ermine
burnt scarab
#

bro

#

thats the character 💀

#

sorry but your player is the like abstract thing that represents your player player

#

so ```local Players = game:GetService("Players")
player = Players.LocalPlayer

tardy ermine
#

The one in the players folder, not the model with the player's username in the workspace folder, sometimes its easy to get them mixed up

burnt scarab
#

yes and I recomment setting the player.Character to your new character after that

tardy ermine
burnt scarab
#

maybeee I am afraid it will present issues replicating after you set it like that

#

like wise to setting a Part.Parent before setting its attributes

tardy ermine
#

Well the script has to go before or else GetDescendants doesnt work

burnt scarab
#

oh set the parent up there but set the character after it

#
NewChar.Parent = workspace

for ...

user.Character = NewCharacter
#

is in my head the safest route

tardy ermine
#

this is client view, i seem to be having an out of body experience

burnt scarab
#

try grouping the Character with the Parent 💀

#

after that ur cooked and I would start another thread for someone else

tardy ermine
#

im pretty sure i'm already cooked

burnt scarab
#

I mean you can check if you are properlly transfering over the Animate script especially

#

or print the part:GetNetworkOwner()?

tardy ermine
#

Turns out it's the truePlayer definition that isn't working? LocalPlayer only works in local scripts, and this is in serverscriptstorage

burnt scarab
#

oh wait

#

where is that script

#

lol brooooooo

#

mbmbmb

#

that is totally my fault 💀

tardy ermine
#

Is there an easy way to get the player from the model?
like, game.Players:WaitForChild(user.Name)?

burnt scarab
#

you get the player from whatever remote event you have

#

its the first parameter

#

your user.

#

oh I misread earlier

#

damn I need to stop sabotaging lol

tardy ermine
burnt scarab
#

alr ur cooked sry

tardy ermine
#

oh

burnt scarab
#

wait

tardy ermine
#

damn

burnt scarab
#

nvm

#

try asking briefly in Scripting, you might get lucky

tardy ermine
#

thanks for trying though 🙏

burnt scarab
#

yeah

#

goodluck

tardy ermine
#

heres the full thing if anyone else finds this thread and can help

burnt scarab
#

I looked it up and you should be setting the Parent to workspace before the character

#

and looking at documentation u should prolly use :PivotTo, it will help with consistency on the model transformation

quasi rover
#

yawn

burnt scarab
#

newChar:PivotTo(oldChar:GetPivot()

tardy ermine
burnt scarab
#

My guess is the since the client uses the CharacterAdded event you have to set the position right after setting the parent, otherwise it will not recognize the current Camera pos

#

although it is already doing that earlier..., lowkey I'll stop its jus weird

tardy ermine
mellow chasmBOT
#

studio** You are now Level 4! **studio

quasi rover
tardy ermine
#

I DID IT

#

I DID IT

#

FINALLY

#

IT WORKS

#

IT LIVES