Animations:
How can I make npc that sometime play different animation?
Example: Every 10 secs, Npc play an animation like:
Roar!! , Sleep, Jump, Idle1, Idle2.
(Sometime sleep, sometime jump for fun, etc)
My goal: The system must like Fox animations, system in Minecraft.
Effects
When I stand near NPC, I will receive a special effects like fire, forcefield.
Others
When I stand near NPC, they will run away from me. When I walk slowly, they won’t know that I am near. It like real-life events.
(Example: I stand near a chicken, It will runaway from me, when I walk slowly, It won’t runaway from me).
Regarding the scripting side of your system, it will require a decent knowledge on pathfindingservice , furthermore the other bits of the scripts are pretty easy to do, you can check the distance between you and the npc by using Magnitute, and check the walk speed of the Humanoid.
Npc PathFindingSerive Tutorial:
Distance between objects:
And for checking the walk speed you can do something like
local npc = game.workspace.NPC
local NHUM = npc.Humanoid
game.Players.PlayerAdded:Connect(function(PLR)
local HUM = PLR.Character.Humanoid
If HUM.WalkSpeed <= 10 then
— Your script here
elseif HUM.WalkSpeed >= 9 then
— Your script here
end
end)