|
| 03 Jun 2012 10:14 PM |
I made a gun, but I don't know how to make it count Kills.
It operates fine, but it doesn't add a KO onto the leaderboard when you make a kill.
Is there any way I can fix this?
The two main scripts are the GunScript, and the ProjectileScript. |
|
|
| Report Abuse |
|
|
|
| 03 Jun 2012 10:21 PM |
| The main way to do it is when a person dies from the bullet of a gun, the script should find the bullets gun, and find the the owner of that gun, and give said person a kill. It's not as hard as it sounds. |
|
|
| Report Abuse |
|
|
|
| 03 Jun 2012 10:21 PM |
| Well, I can't do anything without them posted because I refuse to look something up that you need help with, sorry. |
|
|
| Report Abuse |
|
|
|
| 03 Jun 2012 10:25 PM |
ProjectileScript here:
damage = 30
game:GetService("Debris"):AddItem(script.Parent, 10)
function onTouched(hit)
if hit.Parent:findFirstChild("Humanoid")~=nil then
hit.Parent["Humanoid"]:TakeDamage(damage)
end
wait()
script.Parent:Remove()
end
script.Parent.Touched:connect(onTouched) |
|
|
| Report Abuse |
|
|
|
| 03 Jun 2012 10:29 PM |
| I don't know if you know how to script, but banana made it kinda clear on how you should do it, and if you can't, suggest you start learning because this is starting to sound like a illegal request. |
|
|
| Report Abuse |
|
|
|
| 03 Jun 2012 10:31 PM |
I looked at "PutCameraOnKiller" Script in the Catalog, the other day, and it seemed to have a Count Kills script, too, attached to the Leader Board.
It says that it "just runs", but I never tested it. Try it.
|
|
|
| Report Abuse |
|
|
|
| 03 Jun 2012 10:34 PM |
You need an owner value. http://wiki.roblox.com/index.php/How_do_I_make_weapon_buttons%3F#Damage
This part of this guide explains how. |
|
|
| Report Abuse |
|
|
|
| 03 Jun 2012 10:35 PM |
I just need a few short lines to make it work.
I'm not asking anyone to make me an entire script or anything. |
|
|
| Report Abuse |
|
|
|
| 03 Jun 2012 10:35 PM |
| @Electric, yeah I was gonna say don't You need "owner" ObjectValue? |
|
|
| Report Abuse |
|
|
|
| 03 Jun 2012 10:37 PM |
| MDB I think, can't remember which mod, once told me the name doesn't matter, it does however have to be inside the Humanoid and it has to be an ObjectValue so it counts in the website. |
|
|
| Report Abuse |
|
|