Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

How to make an enemy use a weapon?

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!

4 comments

0

Put the tool in their backpack.

0

I don't think there is a way to do that on a model

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.

0

Oh okay, thanks anyway

1 answer

✓ Accepted answer

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)

This discussion is preserved as it was. New answers, comments, and votes are closed.