Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

Animation unable to cash to object?

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)

1 comment

0

Do hum:LoadAnimation(animTrack)

1 answer

✓ Accepted answer

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

1 comment

0

what do I change (animeTrack) to?

This discussion is preserved as it was. New answers, comments, and votes are closed.