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

Why is my output saying: 'attempt to index nil with Play'?

Asked by 1 year ago

The output says: 'attempt to index nil with Play'

My code:

These are just the main parts (no ends because not needed for question)

local fireAnim = Instance.new('Animation')
fireAnim.Parent = framework.viewmodel
fireAnim.Name = 'Fire'
fireAnim.AnimationId = framework.module.fireAnim
fireAnim = framework.viewmodel.AnimationController.Animator:LoadAnimation(fireAnim)

if input.UserInputType == Enum.UserInputType.MouseButton1 then
    fireAnim:Play()
end

1 answer

Log in to vote
0
Answered by
wrello 0
1 year ago
fireAnim =

That's the issue ^

0
wat Xapelize 2658 — 1y
0
This is a single line just that is too long to fill the space. 9mze 193 — 1y
Ad

Answer this question