I have no idea how to do this. I've tried true/false values to trigger the animation and other stuff that was recommended, but none of it worked.. Please help!
COMMUNITY QUESTION
how do i trigger an npc to do an animation whe a player touches a brick?
1 answer
well just do this:
local Players = game:GetService("Players")
local part = --the part to be touched
local AnimationID = 0000000-- the animation id
part.Touched:Connect(function(part)
local humanoid = part.Parent:FindFirstChld("Humanoid");
if(humanoid and not Players:GetPlayerFromCharacter(part.Parent)) then
local animationTrack = humanoid:LoadAnimation(AnimationID);
animationTrack:Play();
end
end)
This discussion is preserved as it was. New answers, comments, and votes are closed.

3 comments
but that's playing animation on the player that touched the brick he wants the NPC to play animation not the player that touched.
ohh lemme edit it a bit to accomondate for that
Ok I’m about to test it