Server Script:

script.Parent.Touched:Connect(function(hit)
    local humanoid = hit.Parent:FindFirstChild("Humanoid")
    if humanoid then
        local Character = hit.Parent
        local anim = game:GetService("ServerStorage").RandomStuff:FindFirstChild("RandomAnimation"):Clone()
        local animTrack = Character.Humanoid:LoadAnimation(anim)
        animTrack.Looped = true
        animTrack:Play()
    end
end)

1 comment

0

Playing Animations on the client replicate to the server. Also Humanoid:LoadAnimation() is deprecated.