|
| 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 |
|
|
|
| 02 Feb 2016 03:57 PM |
| Tagging in your weapon scripts |
|
|
| Report Abuse |
|
|
|
| 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
|
  |
| 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 |
|
|
|
| 02 Feb 2016 04:02 PM |
| To xlaser, where would I put the script in? In the gun or what? |
|
|
| Report Abuse |
|
|
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 |
|
|