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: filter enabled when zombie die give xp

Previous Thread :: Next Thread 
IsraelGamer101 is not online. IsraelGamer101
Joined: 19 Sep 2016
Total Posts: 138
21 Oct 2017 12:31 PM
how to add xp to my leaderstats when zombie dies?
i tired to do when i hit the zombie its saving my name in string value in the zombie
and when his hp == 0 fire server or fire client add xp to player it didnt work

should the script that when zombie have 0 be a local script or normal script?
Report Abuse
ReallyExpensive is not online. ReallyExpensive
Joined: 01 Apr 2013
Total Posts: 951
21 Oct 2017 12:32 PM
x = leaderstats Value

x.Value = x.Value+1
Report Abuse
McRocketNuggets is not online. McRocketNuggets
Joined: 23 Nov 2016
Total Posts: 472
21 Oct 2017 12:34 PM
Did this for a project a while back

game.workspace.ChildAdded:Connect(function(child)
if child.Name == "Zombie" then
local Humanoid = child:WaitForChild("Humanoid")
Humanoid.Died:Connect(function()
if Humanoid:FindFirstChild("creator") ~= nil then
local Killer = Humanoid.creator.Value
Killer.leaderstats.Cash.Value = Killer.leaderstats.Cash.Value + 20
end
end)
end
end)
Report Abuse
IsraelGamer101 is not online. IsraelGamer101
Joined: 19 Sep 2016
Total Posts: 138
21 Oct 2017 12:35 PM
?????? i know that but im trying to do it filter enabled
Report Abuse
IsraelGamer101 is not online. IsraelGamer101
Joined: 19 Sep 2016
Total Posts: 138
21 Oct 2017 12:37 PM
i wrote it to ReallyExpensive
thanks McRocketNuggets i will try it
Report Abuse
IsraelGamer101 is not online. IsraelGamer101
Joined: 19 Sep 2016
Total Posts: 138
21 Oct 2017 01:23 PM
thanks i used Humanoid.Died:Connect(function() instead of if humanoid.Health == 0 its worked :D
Report Abuse
IsraelGamer101 is not online. IsraelGamer101
Joined: 19 Sep 2016
Total Posts: 138
21 Oct 2017 04:41 PM
why its work in studio but when i publish its not working? please help
Report Abuse
McRocketNuggets is not online. McRocketNuggets
Joined: 23 Nov 2016
Total Posts: 472
21 Oct 2017 04:49 PM
Did you place my code inside of a server sided script?
Report Abuse
IsraelGamer101 is not online. IsraelGamer101
Joined: 19 Sep 2016
Total Posts: 138
21 Oct 2017 04:58 PM
i put it inside the zombie in folder in workspace
Report Abuse
McRocketNuggets is not online. McRocketNuggets
Joined: 23 Nov 2016
Total Posts: 472
21 Oct 2017 05:03 PM
Put my script inside "ServerScriptService"
Report Abuse
IsraelGamer101 is not online. IsraelGamer101
Joined: 19 Sep 2016
Total Posts: 138
21 Oct 2017 05:25 PM
ok i put it there but its work only in studio
Report Abuse
IsraelGamer101 is not online. IsraelGamer101
Joined: 19 Sep 2016
Total Posts: 138
21 Oct 2017 05:51 PM
bump
Report Abuse
IsraelGamer101 is not online. IsraelGamer101
Joined: 19 Sep 2016
Total Posts: 138
22 Oct 2017 12:17 PM
bump
Report Abuse
IsraelGamer101 is not online. IsraelGamer101
Joined: 19 Sep 2016
Total Posts: 138
22 Oct 2017 01:58 PM
soomeone please help me why its works in studio and not when i publish it
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