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

Why isn't the animation playing when the player touches the part with that tool?

Asked by 4 years ago

Why isn't the animation playing when the player touches the part with that tool? Rest of the script is working fine until I added the animation in. What am i doing wrong?

local Boards = workspace.Keycard
local anim = Instance.new("Animation")
anim.AnimationId = "http://www.roblox.com/asset/?id=04817034121"


script.Parent.Touched:connect(function(p)
if p.Parent.Name == "Card" then
local humanoid = p.Parent:FindFirstChild("Humanoid")
if not humanoid then return end
local playAnim = humanoid:LoadAnimation(anim)
playAnim:Play()
script.Parent.Transparency = 1
script.Parent.CanCollide = false
script.Parent.CFrame = CFrame.new(-182.762, -79.48, 273.027)
humanoid.WalkSpeed = 0
wait(2.50)
0
Try "rbxassetid://##ID##" instead Ziffixture 6913 — 4y
0
doesn't work ^ TheBuliderMC 84 — 4y

Answer this question