So for my script here:
local strike = game.ReplicatedStorage.Remotes.SkillStrike
local strikes_table = {
Basic = {
Animation = "rbxassetid://5053852957",
Skill = 1
},
Double = {
Animation = "rbxassetid://5056287197",
Skill = 5
},
Spin = {
Animation = "rbxassetid://5056272042",
Skill = 8
},
}
strike.OnServerEvent:Connect(function(plr, skill)
local stat = plr:WaitForChild('leaderstats').Skill
local human = plr.Character:WaitForChild("Humanoid")
local anim = Instance.new("Animation")
for i, v in pairs(strikes_table) do
if i == skill then
anim.AnimationId == v.Animation
end
end
local plrAnim = human:LoadAnimation(anim)
plrAnim:Play()
end)
You do a certain skill based on the parameter skill
. Somehow this line:
anim.AnimationId == v.Animation
is erroring. It says:
Incomplete statement: expected assignment or a function call
How do I fix this? I have no idea how to.