Hello! I’m a new developer who just started learning a lot about scripting.
Currently I have a well made game but I just stumbled upon a really basic problem I couldn’t solve. Again I’m still learning but I have no idea how to add it.
This may be easy for you to add but I don’t know how to make it. I’m trying to make an animation that I made start when an NPC loads into a game.
I tried to search on the Dev Forum, look up YouTube Tutorials or anything I could use to find the answer to my simple question, but no, I didn’t find anything.
Simple feedback would really help. I hope soon I could master scripting and make a great game everyone can enjoy, but that reality hasn’t evolved yet.
game.Players.PlayerAdded:Connect(function(plr)--Player joins
plr.CharacterAdded:Connect(function(char)--character is added
local hum = char:WaitForChild("Humanoid")
local anim = --Put your animation's location here Example : game.ReplicatedStorage.Animation
hum:LoadAnimation(anim)
anim:Play()
end)
end)