#I am making an m1 system using server authority. Local animations don't play properly and its buggy.
1 messages · Page 1 of 1 (latest)
can you elaborate on the problem
The animations don’t play, even though :Play() was ran. Sometimes it would work, sometimes it wouldn’t.
do you give them enough time to preload?
Roblox studio just broken atp i swear
oh wait no yeha im being deadass @trail garden
wait what type of animation is it?
if its like a rig animation then yh roblox broken atm
yes, my AllAssets module automatically preloads them
im not sure
r6
thats all I know
yeah
wont work then
set game settings to r6, your avatar to r6, and ur still r15
add a print statement saying something like print(plr.Character.RigType)
or plr.RigType
i forgot
i had the same error and found it was literally just their new avatar system
I redid my same script without server authority and it worked
@trail garden
make a local script rq
or anything in playerchar
and run this
local plr = game.Players.LocalPlayer
local char = plr.Character or plr.CharacterAdded:Wait()
local hum = char:WaitForChild("Humanoid")
if char and hum then
print(hum.RigType)
end
it will prob print smth like 'Enum.HumanoidRigType.R15'
thats just roblox being a bit slow in the head
holy i remember that stupid bug
yep
yeah
no freaking way
you cant change it so dont try
😭
its roblox new avatar bullshit
kinda fucks me over considering my main focus is scripting animating and vfx 😭
actually
What i mean by this is like dont try change ur settings to standard r6 or your avatar to r6 unless u wanna waste time 😭
Can you edit vfx in an animation?
yh 😭
he got banned
for ban evading lmfao
lmfaooo
L ig
i liked him
to run vfx with animation
i use moon animator
create an animation event, and inside it change the code
can you do sfx too?
I thought thats only a moon feature.
the sfx isnt in video because i forgot to enable audio so i added music
yeaah but u can with scripting
i use moon tho
i got moon years back
vfx was too bright like on the slash i fixed that, but it changed just as i was recording and i aint even notice
Why can't you just add the vfx object to the timeline, and like changing the properties of a basepart, you change the Play property in the vfx object or something like that
lmao
because roblox r lazy and dont care about us fr
a third party source (moon animator) is better
So, I switched the thing to r6, and the HumanoidRigType stayed r15 but the avatar was r6 😭
** You are now Level 21! **
SHUT UP
yh ik 😭
i warned you
shi is broken asf
Yh i had this asw
Ill lyk how I fixed it when im on my pc (few hours)
There was a setting in the avatar settings thing to switch avatar type to r15/r6
(From the top of my head I think u press the 3 dots in the top right of the avatar settings, which opens a small menu with 3 options) @trail garden
I know that, but it won’t work
if it works it works 🤷
your code is not built correctly to handle rollback and resim on misprediction, so anims will be jank and may stutter / restart multiple times. same thing happens to sounds and vfx.
best i can suggest at the moment is read the docs "advanced techniques: play a sound" https://create.roblox.com/docs/projects/server-authority/techniques#animations-sounds-and-visual-effects
What about this issue @dusky sun
OK, so what I’m getting from this is that sometimes the client will miss predict what the server does, and that messes up animations, VFX, sounds, etc.
For animations, I can make a custom table that has the animation track and the previous animation timestamp.
local PreviousTimestamp = AnimationTrackTable.PreviousTimePosition
local RecordedTimstamp = AnimationTrackTable.AnimationTrack.TimePosition
If PreviousTimestamp ~= RecordedTimestamp then
AnimationTrackTable.AnimationTrack.TimePosition = AnimationTrackTable.PreviousTimePosition
end
Would something like this work
yeh no the problem isnt that, its that an r6 anim cant run on an r15 rig, and despite efforts to change to r6, (changing their actual avatar to r6 and settings), EVEN if ur body shows r6 limbs, inside has r15 meshes, and when u run print(plr.Character.Humanoid.RigType) it prints r15, which animations that are r6 can't be ran on.
no issue. the rig is either r6 or r15 doesnt matter what the rigtype says. if the animation plays at all then it's not a rigtype mismatch.
pretty simple to figure that one out
and because of the fact they say that the animations don't play properly rather than don't play at all, big difference in condition there, it's a safe bet this isn't the problem.
well id assume their animations aint running
which only leaves this as the remaining problem. animations won't play properly from a simulation without special handling.
and this is not correct handling: ```lua
M1InputAction.Pressed:Connect(function()
M1Hold = true
end)
M1InputAction.Released:Connect(function()
M1Hold = false
end)
task.spawn(function()
while true do
if M1Hold then
ExecuteM1(LocalPlayer.Character)
end
task.wait()
end
end)```
occasionally problems like this can be a rigtype mismatch, but with server authority involved and we know occasionally the animation does play correctly, so it's just simply improper simulation code.
ok, what's the correct way?
best advice i can give you at the moment is read the docs https://create.roblox.com/docs/projects/server-authority and i suggest looking at runservice:bindtosimulation
so there is no correct way?
when is there ever a single correct way to do anything? 
Answer the question, socrates. 
is this not an answer?
Oh wait
Now I realized.
My apologies
server authority is some fairly advanced tech, and also very early release. there's not even any misprediction debug info, you kinda just have to guess at the moment.
add to that, a standard humanoid walking into an unanchored part triggers mispredictions, that's a problem with roblox, and likely why they're rushing to release their updated unified replacement for the humanoid, along with the AnimationConstraint.
Why can we specify the FrequencyStep?
RunService:BindToSimulation(function()
if M1Hold then
ExecuteM1(LocalPlayer.Character)
end
task.wait()
end, Enum.StepFrequency.Hz60)
I don't see the use in it.
i see use in it, would be nice if the other runservice events had it, but eh i couldn't tell you why roblox decided on it
So, what the use?
running the simulation slower
for?
performance
ah
I want to kill myself
Function AnimationTrack.GetMarkerReachedSignal is not allowed for simulation callbacks
Function RemoteEvent.FireAllClients is not allowed for simulation callbacks
can't do sound:play() either 
Can I go outside the simulation?
getting stuff into and out of the simulation is a bit tricky
Is there a better solution? Like using a aignal module?
signal module aint gonna help 
the docs mention a few ways to get data in and out of the simulation
wishing you luck, it's not easy 
and i would know
because server authority m1 go BRRRRRRRRRRRRRRRRRRRRRRRRRR
Could you point me to it?
https://create.roblox.com/docs/projects/server-authority/techniques
A good strategy for rendering a predicted simulation is to synchronize a state machine pattern within the simulation loop and render changes to the state in a render step function.
can't read it for you bruh 🙃
Bump
Another bump
Wait, if you already made it why not just tell me the answer

took you 4 days to notice?
I did tell you the answer. we got access to the same information bruh. read the docs, I cannot read it for you.
You did not tell me why animations don't play localy
you just sent me to the usless ahh docs
animations do play locally. you just cannot play them from within the simulation
try the ol' humanoid.animator:loadanimation():play()
like if this as a baseline isn't working like normal, and i suggest trying it from the command bar, then you got problems before you even got to the simulation
wanna know something crazy
game.Players:FindFirstChildOfClass("Player").Character.Humanoid.Animator:LoadAnimation(path_to_anim):Play() if that doesn't work then fix this first
heartbeat is outside the simulation
any math, logic, or physics associated with the simulation must be done inside the simulation.
i know, captain obvious to the rescue amirite
I am playing the animation there, so why is the animation not playing
that's the core issue
does this work?
lemmi see
coz dont be thinking I made this in a day
it took me like 2 weeks to get it to that point
and its still just a prototype
yes, it dose
yep then your animation is fine 👍 just need to fix your conditions
The client dose reach the AnimationTrack:Play(), its so weird
maybe try it without any time warping
so dont set animtrack.timeposition
just leave it at 0 and play the anim from the start
coz if you're time warping it, and you've got the code wrong, it might be skipping to the end of the animation
guess what
I am not even loading the animations on the client
AHHHHHHHHHHHHHHHH
I wanna die
s1 mistake 
actually skill issue 
Also, how come when I use shift lock it bugs out
not sure, i disabled shiftlock on mine
next step? try your m1 while walking into a part
like so
you can also walk into the npcs
basically it's to reliably trigger a misprediction so you can test your rollback and resim
alternatively, add a small random chance for some variable to deliberately mispredict, e.g set an attribute to the time, but have like a 10% chance to set it to 0.
if it continues to appear smooth even at a low instance prediction success, your rollback and resim is working properly 👍
hopefully roblox gives us proper simulation debugging tools instead of just a single 'prediction success rate' number.
but for now you have to do it the hard way.
looks good 👍 it can help to bring up the server authority debug window to track your prediction success rate. if it's dropping and looks fine, which it does look fine, then you good
now the next step - actually hitting something 
I am not using bind to simulation, eh, i figure that out later
Could you check this also?
if you are not using bind to simulation then you are not using it properly.
this is what misprediction looks like
Will animations, sounds, partials, etc be supported in simulations in the future?
you can already run animations, sounds, particles etc
most likely only animations, otherwise no
should I wait?
So I would have a :BindToSimulation loop and a render step loop, what do I use to bridge the connection?
the docs tell you how.
@dusky sun
what
what's there to check?
My ValidateHitbox function
what needs to be checked about it?
If my hitbox validation is correct
for server authority? probably not. what is this? CheckHitboxEvent:InvokeServer(RootCFrame, Part, workspace:GetServerTimeNow(), Move)
It’s for a client sided hitboxes with several validation, that just sends the hitbox data from the client to the server.
mmkay, and how does server authority work, in your own words?
coz it seems like you missed something rather fundamental; the power of server authority is in clientside prediction; you need to write deterministic hitboxes, you cannot just send hitbox over the network as that defeats the whole point!
you can send hitbox to verify, but roblox already does this as part of server authority
bro missed a memo 
the simulation is the resim part of 'rollback and resimulate'
and why workspace:getservertimenow() ?
https://create.roblox.com/docs/reference/engine/globals/RobloxGlobals#time
If Workspace.AuthorityMode is Enum.AuthorityMode.Server, this value is synchronized between client and server.
Wait what
I don’t understand
The client tries to predict what the server would do next
How though

