i want to change the local picked.
local picked = math.Random(1,animations)
not random. like i want the animation to play one by one.
this is the whole ServerScript.
local ReplicatedStorage = game:GetService("ReplicatedStorage")
local punchEvent = Instance.new("RemoteEvent", ReplicatedStorage)
punchEvent.Name = "PunchEvent"
local animations = {1741614100,1741629151,1744881048}
local function onPunchFired(plr)
local part = Instance.new("Part")
part.Transparency = 0
local char = game.Workspace:FindFirstChild(plr.Name)
local humanoid = char.Humanoid
local animation = Instance.new("Animation")
local picked = --Here
animation.AnimationId = "http://roblox.com/asset/?id="..animations[picked]
local animTrack = humanoid:LoadAnimation(animation)
animTrack:Play()
local dmgScript = script.DmgScript:Clone()
if picked == 1 then
dmgScript.Parent = char.RightLowerArm
elseif picked == 2 then
dmgScript.Parent = char.LeftLowerArm
elseif picked == 2 then
dmgScript.Parent = char.RightLowerArm
end
dmgScript.Disabled = false
wait(0.01)
dmgScript:Destroy()
end
punchEvent.OnServerEvent:Connect(onPunchFired)

4 comments
make a list, then use wait(1) to search through each interval of the list.
like this
can you please answer what are you talking about?
can you please put your answer in the answer box so that i can understand