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: awarding players more then once

Previous Thread :: Next Thread 
seliso is not online. seliso
Joined: 30 Jan 2011
Total Posts: 6443
19 Oct 2014 09:24 PM
function handleKillCount(humanoid, player)
local killer = getKillerOfHumanoidIfStillInGame(humanoid)
local rep = game:GetService("ReplicatedStorage")
local event = rep:WaitForChild("RemoteEvent")
if killer ~= nil then
local stats = killer:findFirstChild("leaderstats")
if stats ~= nil then
local kills = stats:findFirstChild("KOs")
if killer ~= player then
kills.Value = kills.Value + 1
event:FireClient(killer,"KILL")
end
end
end
for i,v in pairs(humanoid:GetChildren()) do
if v.Name == "creator" and v.Value ~= killer then
if v.Value ~= nil then
if v.Value ~= nil then
local helpers = v.Value
local stats = helpers.leaderstats
if stats ~= nil then
stats.Assist.Value = stats.Assist.Value + 1
event:FireClient(helpers,"ASSIST")
end end
end
end
end
end


were it is awarding everyone wrong is "stats.Assist.Value = stats.Assist.Value + 1" it gives the player the amount of tags he put in to the person he helped kill.
Is there a way to fix this?

Thanks - seliso the frog
Report Abuse
seliso is not online. seliso
Joined: 30 Jan 2011
Total Posts: 6443
19 Oct 2014 09:31 PM
bump
Report Abuse
seliso is not online. seliso
Joined: 30 Jan 2011
Total Posts: 6443
19 Oct 2014 09:52 PM
bump
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