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

When I run a anim another player can't use the animation?

Asked by 2 years ago
local Players = game:GetService("Players")
local rp = game.ReplicatedStorage
local summon = rp:WaitForChild("Summon")
local Ismoving = false
print("1")
summon.OnServerEvent:Connect(function(Player, isActive)
    print("2")
    local character = Player.Character
    local Stand = character:WaitForChild("Stand")
    local AnimControl = Stand:FindFirstChild("AnimControl")
    local humanoid = character:WaitForChild("Humanoid")
    print("4")
    local Idle = AnimControl:LoadAnimation(script.Parent.Idle)
    local MovingAnim = AnimControl:LoadAnimation(script.Parent.MovingAnim)
    local Stand = character:WaitForChild("Stand")


    humanoid:GetPropertyChangedSignal("MoveDirection"):Connect(function()
        if humanoid.MoveDirection.Magnitude > 0 then
            if Ismoving then
                return
            end

            Ismoving = true
            Idle:Stop()
            MovingAnim:Play()
        else
            Ismoving = false
            Idle:Play()
            MovingAnim:Stop()
        end
    end)
end)
print("Done")

When I start moving and the movingAnim plays and then another player starts moving they Can't/Don't have the movinganim instead they are just stuck with the idle animation

0
movinganim = Moving Animation Agent0fChaos0 14 — 2y
0
and Its a server script Agent0fChaos0 14 — 2y

1 answer

Log in to vote
0
Answered by 2 years ago
Edited 2 years ago

First of all, Animation is FE. It can be run on the client, and the other clients and the server can see it. So you don't have to activate it on the server. Also as @Agent0fChaos0 said, there are a few things wrong with this script.

Edit: I didn't pay attention when the person who commented, that was actually the person that made the post, sorry ;-;

0
oh I thought that for other people to see it it has to be a server script Agent0fChaos0 14 — 2y
0
Also, thanks for teaching me a new way to script running and jumping animation! :D Finty_james 269 — 2y
Ad

Answer this question