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 » Game Design
Home Search
 

Can any one help me with this script?

Previous Thread :: Next Thread 
nemari0 is not online. nemari0
Joined: 20 Jun 2012
Total Posts: 15
03 Sep 2017 02:24 PM
I been working on this script that when you kill a player you gain money for it, but the problem is I want it to give me a certain amount of money (in this case 50) but instead it starts to duplicate the amount of money (when I kill some body give me 0, after that give me 50 and then 15####0####0####5####eres the script:
local function playerentered(plr)
local stat = Instance.new("IntValue")
stat.Name = "leaderstats"

local cash = Instance.new("IntValue")
cash.Name = "brawl points"
cash.Value = 0
cash.Parent = stat

stat.Parent = plr
plr.Changed:connect (function(property)
if (property == "Character") then

plr.CharacterAdded:connect(function(character)
character:WaitForChild("Humanoid").Died:connect(function()
local tag = character.Humanoid:FindFirstChild("creator")
if tag~= nil then
if tag.Value~= nil then
if not plr.name == tag.name then
cash.Value = cash.Value + 50
print(cash.Value)
end
end
end)
I'll be glad if you help me with this issue :)
Report Abuse
nemari0 is not online. nemari0
Joined: 20 Jun 2012
Total Posts: 15
03 Sep 2017 02:25 PM
Opps wrong forum XDDDDDDDD
Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Game Design
   
 
   
  • 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