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

How do I make npcs with changable weapons?

Asked by 10 years ago

I'm not a good scripter, And I've played the game Attack of the Ninja Masters by roblox or something like that. They can change their weapons as you fight them. I'd also like to know how to make a blood puddle when someone gets hurt script that goes away after 1 minute.

2 answers

Log in to vote
1
Answered by 10 years ago

It would be best to make a script inside the Mesh of the weapon and make a while true do statement. I don't think the swords power changes, but maybe the Mesh does. Try this.

meshs = {"",""}
meshtxture = {"",""}
mesh = script.Parent
while true do
wait()

for i,v in pairs (meshs) do
for i,c in pairs (meshtxture) do

wait(60)    
mesh.MeshId = "http://www.roblox.com/asset/?id="..v
mesh.MeshTexture = "http://www.roblox.com/asset/?id="..c
wait()
end
end
end



Ad
Log in to vote
0
Answered by
Resnex 60
10 years ago
  1. A good solution for your changing problem is to have a script in the NPC that removes the weapon, then clones a tool from lighting into the NPC to replace it.

  2. Upon death, a script should activate when the Humanoid.Health = 0, and spawn a part underneath the body that's a parent of workspace. Wait(60) and then do INSERTNAMEHERE:Remove()

0
Lemme rephrase: 1st I'd like the npcs to change their abilities like 1 ability be teleport and the next be explosion or some and 2nd IN catching fire the blood puddle on damage script: Can u post the actual script so I can just copy and paste it? paulieD123 5 — 10y

Answer this question