local animations = {
script.Animation1,
script.Animation2
}
local player = game:GetService("Players").LocalPlayer
local humanoid = player.Character:WaitForChild("Humanoid")
local button = script.Parent
local RemoteEvent = game:GetService("ReplicatedStorage").Animations.Arms
button.MouseButton1Click:Connect(function()
for index, value in ipairs(animations) do
if value == animations[1] then
local animation = humanoid:LoadAnimation(script:WaitForChild("Animation1"))
animation:Play()
animation:GetMarkerReachedSignal("endFrame"):Connect(function()
animation:AdjustSpeed(0)
end)
end
end
end)
How would I replicate this part to the rest of the clients? Since the client cant see changes or effects made to an animation…
Animations performed on players replicate to the server, or so I’ve heard; regardless, why replicate it to all clients when you can perform it on the server. Fire a remote that plays an animation. ;3;
I also don’t see why you’re adjusting the speed to 0, assuming you’re attempting to stop it, just use AnimationTrack:Stop().
I tried, but I was told this is going to cause problems, in terms of the animation then being sloppy for the client, and i guess clients with lower end PC’s? Besides, I’d want to run this with just a localscript, so I wouldn’t have to switch through the server for every animation I want to run.
I’m pausing it on the last keyframe because I want the animation to be paused in a certain stance… Last time I checked and also tested, the server can’t see you pausing the animation, it just see’s the animation being played through normally.