#Animation aint playing with remoteEvent

1 messages · Page 1 of 1 (latest)

steel steeple
#

Just look at these:
this one is ServerScript service:

local CrouchEvent = Instance.new("RemoteEvent", game.ReplicatedStorage)
CrouchEvent.Name = "CrouchEvent"

local function CrouchAnim(player)
    local character = player.Character
    if character then
        local hum = character:FindFirstChildOfClass("Humanoid")
        if hum then
            local animation = Instance.new("Animation")
            animation.AnimationId = "rbxassetid://12027758629"
            local animator = hum:FindFirstChildOfClass("Animator") or Instance.new("Animator")
            local animationTrack = animator:LoadAnimation(animation)
            animationTrack:Play()
        end
    end
end

CrouchEvent.OnServerEvent:Connect(CrouchAnim)

this one is the localscript:

local UIS = game:GetService("UserInputService")
local CrouchEvent = game.ReplicatedStorage:WaitForChild("CrouchEvent")

UIS.InputBegan:Connect(function(input, gameProcessedEvent)
    if not gameProcessedEvent and input.KeyCode == Enum.KeyCode.C then
        CrouchEvent:FireServer()
    end
end)
#

for some reason the anim aint playing

#

I have spend like 10 mins writing this and flipping 20 debugging it

#

There are no errors output tho

rapid sorrel
#

is the animation owned by you

#

or the group the game is under

#

if not then it won't play

lofty vessel
#

Just play it on the client

rapid sorrel
#

real

steel steeple
#

its a toolbox anim

steel steeple