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: RPG experiance orb

Previous Thread :: Next Thread 
Malconer is not online. Malconer
Joined: 19 Feb 2009
Total Posts: 1296
09 Dec 2012 05:28 PM
I don't know what's wrong with it, it checks the morph to find out what class you are then changes the leaderstat needed.


function onTouched(hit)
if game.Players:GetPlayerFromCharacter(hit.Parent) ~= nil then
if hit.Parent:findFirstChild("xWep") ~= nil then
player = game.Players:GetPlayerFromCharacter(hit.Parent)
qwertyu = player.leaderstats.Paladin.Value
player.Leaderstats.Paladin.Value = qwertyu + 1
script.Parent:remove()
elseif hit.Parent:findFirstChild("Warhammah") ~= nil then
player = game.Players:GetPlayerFromCharacter(hit.Parent)
player.leaderstats.Warrior.Value = player.Leaderstats.Warrior.Value + 1
script.Parent:remove()
end
end
end

script.Parent.Touched:connect(onTouched)
Report Abuse
Malconer is not online. Malconer
Joined: 19 Feb 2009
Total Posts: 1296
09 Dec 2012 05:38 PM
I can't believe there is a troll post getting more attention.
Report Abuse
Malconer is not online. Malconer
Joined: 19 Feb 2009
Total Posts: 1296
09 Dec 2012 05:42 PM
I can't get more information because the leaderboard isn't added in solo mode.
Report Abuse
dmjoe is not online. dmjoe
Joined: 01 May 2009
Total Posts: 2387
09 Dec 2012 05:45 PM
I don't understand what's wrong with this script....
Report Abuse
Malconer is not online. Malconer
Joined: 19 Feb 2009
Total Posts: 1296
09 Dec 2012 06:54 PM
It just doesn't run.
Report Abuse
Malconer is not online. Malconer
Joined: 19 Feb 2009
Total Posts: 1296
10 Dec 2012 02:02 PM
Anyone?!
Report Abuse
nightmare3o is not online. nightmare3o
Joined: 21 Jun 2008
Total Posts: 956
10 Dec 2012 02:32 PM
function onTouched(hit)
if game.Players:GetPlayerFromCharacter(hit.Parent) ~= nil then
if hit.Parent:findFirstChild("xWep") ~= nil then
player = game.Players:GetPlayerFromCharacter(hit.Parent)
qwertyu = player.leaderstats.Paladin
player.Leaderstats.Paladin.Value = qwertyu.Value + 1
script.Parent:Destroy()
elseif hit.Parent:findFirstChild("Warhammah") ~= nil then
player = game.Players:GetPlayerFromCharacter(hit.Parent)
player.leaderstats.Warrior.Value = player.Leaderstats.Warrior.Value + 1
script.Parent:Destroy()
end
end
end

script.Parent.Touched:connect(onTouched)
Report Abuse
Malconer is not online. Malconer
Joined: 19 Feb 2009
Total Posts: 1296
10 Dec 2012 04:30 PM
Still broken.
Report Abuse
Raphael7 is not online. Raphael7
Joined: 03 Dec 2008
Total Posts: 2479
10 Dec 2012 04:38 PM
Put prints on every line and tell us where it does not print.
Report Abuse
Malconer is not online. Malconer
Joined: 19 Feb 2009
Total Posts: 1296
10 Dec 2012 08:00 PM
I literaly just said why that is not an option >.>.
Report Abuse
MassiveGman is not online. MassiveGman
Joined: 23 Jan 2011
Total Posts: 2019
10 Dec 2012 08:03 PM
In the script, you capitalize Leaderstats, and then say leaderstats again in another line.
Make up your mind

Ex:

qwertyu = player.leaderstats.Paladin.Value
^
player.Leaderstats.Paladin.Value = qwertyu + 1



|Paradoxical|
I shun thy heathen, dost thou not know that flames will devour thy mind?
Report Abuse
gametastic100 is not online. gametastic100
Joined: 15 Jun 2011
Total Posts: 1286
10 Dec 2012 08:06 PM
script.Parent.Touched:connect(function(hit)
local g = game.Players:GetPlayerFromCharacter(hit.Parent)
if g ~= nil then
if g.StarterGear:findFirstChild("xWep") ~= nil then
Paladin = g.leaderstats.Paladin.Value
g.Leaderstats.Paladin.Value = Paladin + 1
for i = 1,10 do
script.Parent.Transparency = script.Parent.Transparency - 0.1
end
script.Parent:Destroy()

elseif g.StarterGear:findFirstChild("Warhammah") ~= nil then
g.leaderstats.Warrior.Value = g.Leaderstats.Warrior.Value + 1
for i = 1,10 do
script.Parent.Transparency = script.Parent.Transparency - 0.1
end
script.Parent:Destroy()
end
end
end


Tell meh output.



Added little effects ^.^
Report Abuse
gametastic100 is not online. gametastic100
Joined: 15 Jun 2011
Total Posts: 1286
10 Dec 2012 08:08 PM
script.Parent.Touched:connect(function(hit)
local g = game.Players:GetPlayerFromCharacter(hit.Parent)
if g ~= nil then
if g.StarterGear:findFirstChild("xWep") ~= nil then
Paladin = g.leaderstats.Paladin.Value
g.leaderstats.Paladin.Value = Paladin + 1
for i = 1,10 do
script.Parent.Transparency = script.Parent.Transparency - 0.1
end
script.Parent:Destroy()

elseif g.StarterGear:findFirstChild("Warhammah") ~= nil then
g.leaderstats.Warrior.Value = g.leaderstats.Warrior.Value + 1
for i = 1,10 do
script.Parent.Transparency = script.Parent.Transparency - 0.1
end
script.Parent:Destroy()
end
end
end


Fixed.
Report Abuse
MassiveGman is not online. MassiveGman
Joined: 23 Jan 2011
Total Posts: 2019
10 Dec 2012 08:09 PM
qwertyu = player.leaderstats.Paladin.Value
-------------------^
player.Leaderstats.Paladin.Value = qwertyu + 1
-------^



|Paradoxical|
I shun thy heathen, dost thou not know that flames will devour thy mind?
Report Abuse
MassiveGman is not online. MassiveGman
Joined: 23 Jan 2011
Total Posts: 2019
10 Dec 2012 08:09 PM
"l"eaderstats
"L"leaderstats




|Paradoxical|
I shun thy heathen, dost thou not know that flames will devour thy mind?
Report Abuse
gametastic100 is not online. gametastic100
Joined: 15 Jun 2011
Total Posts: 1286
10 Dec 2012 08:11 PM
script.Parent.Touched:connect(function(hit)
local g = game.Players:GetPlayerFromCharacter(hit.Parent)
if g ~= nil then
if g.StarterGear:findFirstChild("xWep") ~= nil then
Paladin = g.leaderstats.Paladin.Value
g.leaderstats.Paladin.Value = Paladin + 1
for i = 1,10 do
script.Parent.Transparency = script.Parent.Transparency - 0.1
end
script.Parent:Destroy()

elseif g.StarterGear:findFirstChild("Warhammah") ~= nil then
g.leaderstats.Warrior.Value = g.leaderstats.Warrior.Value + 1
for i = 1,10 do
script.Parent.Transparency = script.Parent.Transparency - 0.1
end
script.Parent:Destroy()
end
end
end

Report Abuse
Raphael7 is not online. Raphael7
Joined: 03 Dec 2008
Total Posts: 2479
10 Dec 2012 09:40 PM
Put prints for every line so which ever does not print we know which line is broken. Use the suggestions before you deny them.
Report Abuse
Malconer is not online. Malconer
Joined: 19 Feb 2009
Total Posts: 1296
11 Dec 2012 02:12 PM
I said that won't work and i said why, read every detail before you post.
Report Abuse
Malconer is not online. Malconer
Joined: 19 Feb 2009
Total Posts: 1296
11 Dec 2012 02:13 PM
The capitalization i need to fix i'll try that.
Report Abuse
Malconer is not online. Malconer
Joined: 19 Feb 2009
Total Posts: 1296
11 Dec 2012 02:15 PM
It works now thanks.
Report Abuse
nightmare3o is not online. nightmare3o
Joined: 21 Jun 2008
Total Posts: 956
11 Dec 2012 02:34 PM
That was the problem the entire time... OMG WDF
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