|
| 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 |
|
|
|
| 30 Nov 2011 10:52 AM |
| "creator" tells what killed the object. |
|
|
| Report Abuse |
|
|
|
| 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 |
|
|
|
| 30 Nov 2011 10:57 AM |
Okay, thank you. I can finish my script now.
- ~Cool Kid just got let loose.~ |
|
|
| Report Abuse |
|
|