Damage for tools
#1
Can I use the Lava script to make tools damage? If so how? I put a lava script into the tool but it doesn't work...
Shiggity Shiggity Shwa
[Image: Animated.gif?t=1314294800]
Reply
#2
Tools damage? D=
Then you probably need
Tool.MouseDown and you need to use game.World:getPartAt(mousepos) to find out if mouse is on enemy...

But if you want like melee weapon,
Tool with Holdable on
Tool.MouseDown
and make it use getTrace function to find out if theres a player hitting the "weapon"

D:
[Image: 76561198036192536.png][Image: Ava2.gif]
AntiBoomz0r @ roblox,xfire
AntiBoomz @ minecraft
MiikaFTW @ steam
Reply
#3
Yah, it's a melee weapon, It's holdable and it has a texture that looks great, you can swing it around so I would preferably want it to damage onTouch...

Also If i had to make it so it damages when it's touching A character, I COULD make it so it damages other people and NPCs... MUTINY!
Shiggity Shiggity Shwa
[Image: Animated.gif?t=1314294800]
Reply
#4
lets just say..

If hit.Name ~= script.Parent.Parent.Name (or something like that) and hit.Parent.Type = "NPC" then

hit.Parent.Health = hit.Parent.Health - 10

sleep(.5)

end

This is when the tool collides with something.
Reply
#5
Thanks
If hit.Body ~= script.Parent.Parent.Body

hit.Parent.Health = hit.Parent.Health - 10

sleep(.5)

end

how 'bout that
Shiggity Shiggity Shwa
[Image: Animated.gif?t=1314294800]
Reply
#6
That would work, too. Simplified XD
Reply
#7
Sweet- my first piece of working scripting Tongue
Shiggity Shiggity Shwa
[Image: Animated.gif?t=1314294800]
Reply
#8
Weeee
Reply
#9
More problems, but I posted a different thread for it, since it's a MASSIVE Problem for me.
Shiggity Shiggity Shwa
[Image: Animated.gif?t=1314294800]
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)