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

Animation unable to cash to object?

Asked by 4 years ago

Its happening on line 12 and I dont know how to fix it i've been working on it for 2 days now does anyone know please?

local player = game:GetService("Players").LocalPlayer

repeat
    wait()
until player.Character

local char = player.Character
local hum = char:WaitForChild("Humanoid")


local animTrack = Instance.new("Animation") animTrack.AnimationId ="rbxassetid://4898878621" 
local animation = hum:LoadAnimation("rbxassetid://4898878621")

script.Parent.MouseButton1Click:Connect(function()
    animation:Play()
end)

0
Do hum:LoadAnimation(animTrack) Spjureeedd 385 — 4y

1 answer

Log in to vote
0
Answered by 4 years ago
Edited 4 years ago

Change line 12 to: local animation = hum:LoadAnimation(animeTrack) . The wiki explained this with details. Wiki_Page

0
what do I change (animeTrack) to? no0bgaming748 24 — 4y
Ad

Answer this question