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 » Scripters
Home Search
 

Re: Gain EXP on kill?

Previous Thread :: Next Thread 
ThatOneNoob13 is not online. ThatOneNoob13
Joined: 01 Nov 2012
Total Posts: 114
02 Feb 2016 03:42 PM
I just want to know how to make it so for every kill on another player, the killer receives 50 EXP points. I already made the guns and the leaderstats, I just need to know how to connect the kill to the points.

All I know is it needs to have:

When killed = Player.leaderstats.Value = Player.leaderstats.Value + 50 or something.

Any help would be greatly appreciated ;D
Report Abuse
RecurringNightmare is not online. RecurringNightmare
Joined: 05 Jul 2012
Total Posts: 15336
02 Feb 2016 03:57 PM
Tagging in your weapon scripts
Report Abuse
Lordlukervol is not online. Lordlukervol
Joined: 29 May 2012
Total Posts: 749
02 Feb 2016 03:58 PM
Something in the damage enemy function like...

if enemy.Humanoid.Health <= 0 then
Player.leaderstats.Value = Player.leaderstats.Value + 50
end
Report Abuse
xlaser23 is not online. xlaser23
Joined: 10 Dec 2011
Total Posts: 20341
02 Feb 2016 03:59 PM
Tagging is for squares

local deb = false
script.Parent.Handle.Touched:connect(function(hi)
if deb then return end
local hit = hi.Parent:FindFirstChild('Torso')
deb = true
if hit then
if hit.Parent.Humanoid then
local f = hit.Parent:FindFirstChild('Humanoid')
if f then
f:TakeDamage(20)
if f.Health < 1 then
local y = stats:WaitForChild('Exp')
y.Value = y.Value + 500
end
end
end
end
wait(1.5)
deb = false
end)



http://www.roblox.com/xla-item?id=290739801http://www.roblox.com/aser-item?id=290739819http://www.roblox.com/23-item?id=290739831 R$329 Tx504 (づ ゚ ³ ゚)づ
Report Abuse
ThatOneNoob13 is not online. ThatOneNoob13
Joined: 01 Nov 2012
Total Posts: 114
02 Feb 2016 04:02 PM
To xlaser, where would I put the script in? In the gun or what?
Report Abuse
xlaser23 is not online. xlaser23
Joined: 10 Dec 2011
Total Posts: 20341
02 Feb 2016 04:04 PM
this is for a sword

if u want it with guns add it in ur gun script

im not telling u the rest



http://www.roblox.com/xla-item?id=290739801http://www.roblox.com/aser-item?id=290739819http://www.roblox.com/23-item?id=290739831 R$329 Tx504 (づ ゚ ³ ゚)づ
Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripters
   
 
   
  • 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