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

How to make NPC do same moves as Player?

Asked by 4 years ago
Edited 4 years ago

So say if i put a AI script inside the NPC, How would i make it do same actions as the player? The thing it uses to attack is in Its Head as a Folder named "Container" and it has the model/item it uses to attack

ex. The player can punch using the item, so how would i make the NPC do the same?

local plr = game:GetService("Players").LocalPlayer
repeat
    wait()
until plr.Character and plr.Character.Humanoid
local chr = plr.Character
local human = chr.Humanoid
local hrp = chr.HumanoidRootPart
mouse = plr:GetMouse()
cam = workspace.CurrentCamera
0
give the same animation to the NPC as you gave to the player. kingblaze_1000 359 — 4y
0
uh i have the animations in the model in its humanoid root prat BrandonXYZ9 18 — 4y
0
i basically just need it to do the moves and stuff BrandonXYZ9 18 — 4y

Answer this question