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

How to make an enemy use a weapon?

Asked by
tvfob 6
6 years ago

Does anyone know how to give an enemy ( In this case give a Dalek from Doctor Who) a weapon? I'm trying to make it use a Dalek laser but I'm not sure how you do it. Thanks in advance!

0
Put the tool in their backpack. UgOsMiLy 1074 — 6y
0
I don't think there is a way to do that on a model tvfob 6 — 6y
0
You could try to put the tool into the enemy itself if it’s a humanoid (Like it does with players). If you want the tool to actually fire and work though, I don’t know. User#20279 0 — 6y
0
Oh okay, thanks anyway tvfob 6 — 6y

1 answer

Log in to vote
0
Answered by 6 years ago

You can input a script in the arm or torso. This will only work with touch. I'm not going into detail what all it means.


function onTouched(part) local h = part.Parent:findFirstChild("Humanoid") if h~=nil then h.Health = h.Health - 3 end end script.Parent.Touched:connect(onTouched)
Ad

Answer this question