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

NPC Animation works in Testing but not when I play the game?

Asked by 2 years ago
local anim = Instance.new("Animation")
anim.AnimationId = "rbxassetid://8910536934"

local controller = script.Parent.Humanoid -- path to Humanoid/AnimationController
controller:LoadAnimation(anim):Play()


local prompt = script.Parent.ProximityPrompt
local promptevent = game:GetService("ReplicatedStorage").prompt

prompt.PromptButtonHoldEnded:Connect(function(player)
    promptevent:FireClient(player)
    script.Parent.Sound:Play()
end)

thats the only script, its inside the npc.

Answer this question