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: Killstreak giver help!!!!

Previous Thread :: Next Thread 
A22asin is not online. A22asin
Joined: 04 Jul 2011
Total Posts: 313
20 Aug 2011 01:58 PM
ok, so i was making a killstreak gui where when a person reaches a certain killstreak, they can click the open button and the killstreak frame opens, but my concern is that when i click a killstreak, i do not receive the killstreak. i get this output:


Sat Aug 20 14:50:26 2011 - Running Script "Players.Player.PlayerGui.Killstreak.Main.RCXD.Script"
Sat Aug 20 14:50:26 2011 - Players.Player.PlayerGui.Killstreak.Main.RCXD.Script:22: '< eof >' expected near 'end'

and

Sat Aug 20 14:50:26 2011 - Running Script "Players.Player.PlayerGui.Killstreak.Main.GrimReaper.Main"
Sat Aug 20 14:50:26 2011 - leaderstats is not a valid member of Player
Sat Aug 20 14:50:26 2011 - Script "Players.Player.PlayerGui.Killstreak.Main.GrimReaper.Main", Line 2
Sat Aug 20 14:50:26 2011 - stack end


ok, and heres my RCXD script:


player = script.Parent.Parent.Parent.Parent.Parent
gold = player.leaderstats.Killstreak
item = game.Lighting.RCXD
price = 3



function buy ()
if gold.Value >= price then
script.Parent.Parent.Parent.Disable = true
script.Parent.Parent.Parent.TextTransparency = 0.5
local b52 = game:GetService("InsertService"):LoadAsset(50808700)
b52.Parent = vPlayer.Backpack
local m = vPlayer.Backpack.Model
local va = m:findFirstChild("B-52")
if (va==nil) then return end
va.Parent = m.Parent
m:remove()
script.Parent:remove()
end
end
end
script.Parent.MouseButton1Down:connect(buy)

-----------------------------------------------------------------------------------
and heres my grim reaper script:



player = script.Parent.Parent.Parent.Parent.Parent
gold = player.leaderstats.Killstreak
item = game.Lighting.GrimReaper
price = 7

function buy()
if gold.Value >= price then
script.Parent.Parent.Parent.Disable = true
script.Parent.Parent.Parent.TextTransparency = 0.5
local a = item:clone()
a.Parent = player.Backpack
end
end
script.Parent.MouseButton1Down:connect(buy)
Report Abuse
A22asin is not online. A22asin
Joined: 04 Jul 2011
Total Posts: 313
20 Aug 2011 02:01 PM
srry my RCXD is supposed to be for my b52, i forgot to rename the button. lol, HELP!!!!!!!!!!!!!!!!!!
Report Abuse
TheNewScripter is not online. TheNewScripter
Joined: 02 Mar 2010
Total Posts: 2432
20 Aug 2011 02:02 PM
You have to many ends according to the output...
Report Abuse
A22asin is not online. A22asin
Joined: 04 Jul 2011
Total Posts: 313
20 Aug 2011 02:10 PM
ya, but i went throught the script like 10 times, and all my ends r needed, cuz i have like 2 ifs and a function.
Report Abuse
A22asin is not online. A22asin
Joined: 04 Jul 2011
Total Posts: 313
20 Aug 2011 02:40 PM
anyone esle?!?!?! BUMP
Report Abuse
grimm343 is not online. grimm343
Joined: 18 Sep 2008
Total Posts: 2796
20 Aug 2011 03:00 PM
It's true. Too many ends.

Some of your if lines have ends on the same line. Do not add it, again.
Report Abuse
grimm343 is not online. grimm343
Joined: 18 Sep 2008
Total Posts: 2796
20 Aug 2011 03:03 PM
"leaderstats is not a valid member of Player"

That's your other script. I think that tells you exactly what is the matter.
Report Abuse
A22asin is not online. A22asin
Joined: 04 Jul 2011
Total Posts: 313
20 Aug 2011 03:09 PM
leaderstats is not a valid mem, does that mean that it cannot find my leaderboard?
Report Abuse
darkkiller5555 is not online. darkkiller5555
Joined: 22 Nov 2009
Total Posts: 6359
20 Aug 2011 03:10 PM
Sometimes the one script runs before another. It's nothing to worry about, it'll work in online mode.
Report Abuse
A22asin is not online. A22asin
Joined: 04 Jul 2011
Total Posts: 313
20 Aug 2011 03:13 PM
ok, but i still cannot figure out the b52 script, im stumped! lmao, can someone help me find the extra end?
Report Abuse
hithere4994 is not online. hithere4994
Joined: 25 Sep 2010
Total Posts: 2459
20 Aug 2011 03:32 PM
player = script.Parent.Parent.Parent.Parent.Parent
gold = player.leaderstats.Killstreak
item = game.Lighting.RCXD
price = 3



function buy ()
if gold.Value >= price then
script.Parent.Parent.Parent.Disable = true
script.Parent.Parent.Parent.TextTransparency = 0.5
local b52 = game:GetService("InsertService"):LoadAsset(50808700)
b52.Parent = vPlayer.Backpack
local m = vPlayer.Backpack.Model
local va = m:findFirstChild("B-52")
if (va==nil) then return end
va.Parent = m.Parent
m:remove()
script.Parent:remove()
end
end
script.Parent.MouseButton1Down:connect(buy)

That should work.
Report Abuse
A22asin is not online. A22asin
Joined: 04 Jul 2011
Total Posts: 313
20 Aug 2011 04:05 PM
OK, BUT NOW, I DONT GET THE KILLSTREAK REWARD FOR EITHER. PLZ HELP!
Report Abuse
hithere4994 is not online. hithere4994
Joined: 25 Sep 2010
Total Posts: 2459
20 Aug 2011 04:22 PM
Make sure all the variables are defined properly.
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