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

Why animation don't playing on the server while in roblox studio animations are working?

Asked by
lolenko 17
4 years ago
pc = 1

game.ReplicatedStorage.GiveFire.OnServerEvent:Connect(function(player)
    local char = player.Character
    local anim = Instance.new("Animation")
    local animd = Instance.new("Animation")
    local hum = char:WaitForChild("Humanoid")
    local animid = game.StarterGui.ScreenGui.Frame.Punch.AnimationId
    local animids = game.StarterGui.ScreenGui.Frame.PunchTwo.AnimationId
    anim.AnimationId = animid
    animd.AnimationId = animids
    local animat = hum:LoadAnimation(anim)
    local animatt = hum:LoadAnimation(animd)
    if pc == 1 then
        animat:Play()
        pc = 2
    elseif pc == 2 then
        animatt:Play()
        pc = 1
    end 
    player.leaderstats.Firex.Value = player.leaderstats.Firex.Value + 1
end)

1 answer

Log in to vote
0
Answered by
lolenko 17
4 years ago

LOL, if u making group game, u need save animation to group animations

Ad

Answer this question