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: How does this work..

Previous Thread :: Next Thread 
Willingroblox123 is not online. Willingroblox123
Joined: 18 Jan 2010
Total Posts: 6872
30 Nov 2011 10:50 AM
Okay, i'm sure all of you have played atleast one RPG before, but i'm confused on how just one thing works.
The gold/exp reward, i've tried looking at the scripts, but I get lost at..

local tag = Humanoid:findFirstChild("creator")

(Full script)

--On lines 10 and 29 change Gold to the name of your money and Exp to the stat you wish to upgrade. -willingroblox123: no noob i edit line 8 too

local Humanoid = script.Parent.Humanoid -- Change Enemy to the name of your Monsters Humanoid
function PwntX_X()
local tag = Humanoid:findFirstChild("creator")
    if tag ~= nil then
        if tag.Value ~= nil then
local Leaderstats = tag.Value:findFirstChild("Karma")
            if Leaderstats ~= nil then
Leaderstats.Gold.Value = Leaderstats.Gold.Value - 1 --see, these scripts can be made for good use -- willingroblox123
wait(0.1)
script:remove()
            end
        end
    end
end
Humanoid.Died:connect(PwntX_X)

So, any help with explaining this..?

- ~Cool Kid just got let loose.~
Report Abuse
techepicface is not online. techepicface
Joined: 28 Jun 2011
Total Posts: 1180
30 Nov 2011 10:52 AM
"creator" tells what killed the object.
Report Abuse
pokelord910 is not online. pokelord910
Joined: 26 May 2009
Total Posts: 1045
30 Nov 2011 10:53 AM
it 'tags' the name of the person who killed them, finds there leaderstats, and edits them appropriately
Report Abuse
Willingroblox123 is not online. Willingroblox123
Joined: 18 Jan 2010
Total Posts: 6872
30 Nov 2011 10:57 AM
Okay, thank you. I can finish my script now.

- ~Cool Kid just got let loose.~
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