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

Attempt to call a boolean value, Any help?

Asked by 2 years ago

I tried making animation gui , And everytime i pressed play it gave an error

Script:

local btn = script.parent

local hummy = game:GetService("Players").LocalPlayer.Character.Humanoid

local stu = Instance.new('Animation')

stu.AnimationId = 'rbxassetid://978176345'

local notfunny = hummy:LoadAnimation(stu)

btn.MouseButton1Click:Connect(function()    
        if notfunny.IsPlaying() then
        notfunny:Stop()

    else
        notfunny:Play()
        notfunny:AdjustSpeed(1)
    end
end)

1 answer

Log in to vote
0
Answered by 2 years ago

You are attempting to use IsPlaying() as if it were a function. The correct way is .IsPlaying as if it were a property.

Ad

Answer this question