my script
math.randomseed(tick())
local ReplicatedStorage = game:GetService("ReplicatedStorage")
local punchEvent = Instance.new("RemoteEvent", ReplicatedStorage)
punchEvent.Name = "PunchEvent"
local animations = (2729957815)
local function onPunchFired(plr)
local char = game.Workspace:FindFirstChild(plr.Name)
local humanoid = char.Humanoid
local animation = Instance.new("Animation")
animation.AnimationId = "http://roblox.com/asset/?id="..animations[math.random(1, #animations)]
local animTrack = humanoid:LoadAnimation(animations)
animTrack:Play()
end
punchEvent.OnServerEvent:Connect(onPunchFired)
the error
20:28:03.324 - ServerScriptService.Punch:13: attempt to get length of upvalue 'animations' (a number value)
how do i fix this plss help

1 comment
You need to use { } to define a table not ().