generic image
Processing...
  • Games
  • Catalog
  • Develop
  • Robux
  • Search in Players
  • Search in Games
  • Search in Catalog
  • Search in Groups
  • Search in Library
  • Log In
  • Sign Up
  • Games
  • Catalog
  • Develop
  • Robux
   
ROBLOX Forum » Game Creation and Development » Scripting Helpers
Home Search
 

Re: Help with a simple gun

Previous Thread :: Next Thread 
alexrider58 is not online. alexrider58
Joined: 15 Jul 2009
Total Posts: 1807
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
bananacupcake is not online. bananacupcake
Joined: 15 Jun 2010
Total Posts: 571
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
TheLuaTester is not online. TheLuaTester
Joined: 24 May 2012
Total Posts: 168
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
alexrider58 is not online. alexrider58
Joined: 15 Jul 2009
Total Posts: 1807
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
TheLuaTester is not online. TheLuaTester
Joined: 24 May 2012
Total Posts: 168
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
BJCarpenter is not online. BJCarpenter
Joined: 04 Nov 2008
Total Posts: 4416
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
ElectricAxel is not online. ElectricAxel
Joined: 15 May 2009
Total Posts: 16239
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
alexrider58 is not online. alexrider58
Joined: 15 Jul 2009
Total Posts: 1807
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
thecaptain97 is not online. thecaptain97
Joined: 17 Jun 2010
Total Posts: 4987
03 Jun 2012 10:35 PM
@Electric, yeah I was gonna say don't You need "owner" ObjectValue?
Report Abuse
ElectricAxel is not online. ElectricAxel
Joined: 15 May 2009
Total Posts: 16239
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
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripting Helpers
   
 
   
  • About Us
  • Jobs
  • Blog
  • Parents
  • Help
  • Terms
  • Privacy

©2017 Roblox Corporation. Roblox, the Roblox logo, Robux, Bloxy, and Powering Imagination are among our registered and unregistered trademarks in the U.S. and other countries.



Progress
Starting Roblox...
Connecting to Players...
R R

Roblox is now loading. Get ready to play!

R R

You're moments away from getting into the game!

Click here for help

Check Remember my choice and click Launch Application in the dialog box above to join games faster in the future!

Gameplay sponsored by:
Loading 0% - Starting game...
Get more with Builders Club! Join Builders Club
Choose Your Avatar
I have an account
generic image