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: Help

Previous Thread :: Next Thread 
rtardbob123 is not online. rtardbob123
Joined: 13 Feb 2010
Total Posts: 15868
28 Jun 2013 08:18 PM
Ok so i have a Shop Gui and everything works fine but the guns
Guns work in solo play but no in the game
Report Abuse
IAmReallyAwesome is not online. IAmReallyAwesome
Joined: 05 Mar 2010
Total Posts: 7371
28 Jun 2013 08:19 PM
Yeah... You've gotta post the script XD
Report Abuse
Thaeh is not online. Thaeh
Joined: 05 Feb 2011
Total Posts: 7685
28 Jun 2013 08:19 PM
Try using an online Output GUI to check what error messages it gives you.
Report Abuse
rtardbob123 is not online. rtardbob123
Joined: 13 Feb 2010
Total Posts: 15868
28 Jun 2013 08:19 PM
o forgot
sorry


Script:


local backpack = game.Players.LocalPlayer.Backpack
local startergear = Game.Players.LocalPlayer.StarterGear
local leaderboard = game.Players.LocalPlayer.leaderstats.Points
function buy()
if leaderboard.Value >= 5000 then
if not backpack:FindFirstChild('AK') or not startergear:FindFirstChild('AK') then
ak = game.Lighting.AK:Clone()
ak.Parent = backpack
for i, v in pairs(ak:GetChildren()) do
if v:IsA('BaseScript') then
v.Disabled = true; v.Disabled = false
end
end
uzi:Clone().Parent = startergear
leaderboard.Value = leaderboard.Value - 5000
end
end
end
script.Parent.MouseButton1Down:connect(buy)
print("asd")

Report Abuse
Thaeh is not online. Thaeh
Joined: 05 Feb 2011
Total Posts: 7685
28 Jun 2013 08:23 PM
We need the gun scripts, not the shop script.
In any case, it's most likely that you will have to find new guns (considering you didn't make them)
Report Abuse
rtardbob123 is not online. rtardbob123
Joined: 13 Feb 2010
Total Posts: 15868
28 Jun 2013 08:24 PM
There's like 5 scripts in the gun
Report Abuse
IAmReallyAwesome is not online. IAmReallyAwesome
Joined: 05 Mar 2010
Total Posts: 7371
28 Jun 2013 08:24 PM
You didn't define 'uzi'
Report Abuse
IAmReallyAwesome is not online. IAmReallyAwesome
Joined: 05 Mar 2010
Total Posts: 7371
28 Jun 2013 08:25 PM
And is the script a LocalScript? If it's not, it should be.
Report Abuse
rtardbob123 is not online. rtardbob123
Joined: 13 Feb 2010
Total Posts: 15868
28 Jun 2013 08:26 PM
o forgot to change that
i used the same script for every gun in the shop

but it still doesn't work
Report Abuse
rtardbob123 is not online. rtardbob123
Joined: 13 Feb 2010
Total Posts: 15868
28 Jun 2013 08:26 PM
It's a local script
Report Abuse
IAmReallyAwesome is not online. IAmReallyAwesome
Joined: 05 Mar 2010
Total Posts: 7371
28 Jun 2013 08:31 PM
Oh, you need quotes with the :FindFirstChild("AK")

You only have '
Report Abuse
rtardbob123 is not online. rtardbob123
Joined: 13 Feb 2010
Total Posts: 15868
28 Jun 2013 08:31 PM
' works as the same as "
Report Abuse
Thaeh is not online. Thaeh
Joined: 05 Feb 2011
Total Posts: 7685
28 Jun 2013 08:32 PM
"Ak"
'Al'
[[ak
hue her]]

are all the same.
Report Abuse
IAmReallyAwesome is not online. IAmReallyAwesome
Joined: 05 Mar 2010
Total Posts: 7371
28 Jun 2013 08:34 PM
gah, not sure...

Perhaps try :clone() instead of :Clone()

lol I'm just nitpicking through possibilities right now.
Report Abuse
Thaeh is not online. Thaeh
Joined: 05 Feb 2011
Total Posts: 7685
28 Jun 2013 08:36 PM
That's not either.
Like he said, the shop works fine, guns don't. Therefore, he needs new guns! Yeah.
Report Abuse
IAmReallyAwesome is not online. IAmReallyAwesome
Joined: 05 Mar 2010
Total Posts: 7371
28 Jun 2013 08:39 PM
local backpack = game.Players.LocalPlayer.Backpack
local startergear = game.Players.LocalPlayer.StarterGear
local leaderboard = game.Players.LocalPlayer.leaderstats.Points
function buy()
if leaderboard.Value >= 5000 then
if not backpack:FindFirstChild('AK') and not startergear:FindFirstChild('AK') then
ak = game.Lighting.AK:Clone()
ak.Parent = backpack
for _, v in pairs(ak:GetChildren()) do
if v:IsA('BaseScript') then
v.Disabled = true
wait()
v.Disabled = false
end --if
end --for
uzi = game.Lighting.uzi --change to correct name
uzi:cone().Parent = startergear
leaderboard.Value = leaderboard.Value - 5000
end --if n
end --if l
end --function
script.Parent.MouseButton1Down:connect(buy)


Yeah, I just changed a ton of tiny things that probably shouldn't make much difference but... See what happens XD
Report Abuse
IAmReallyAwesome is not online. IAmReallyAwesome
Joined: 05 Mar 2010
Total Posts: 7371
28 Jun 2013 08:39 PM
local backpack = game.Players.LocalPlayer.Backpack
local startergear = game.Players.LocalPlayer.StarterGear
local leaderboard = game.Players.LocalPlayer.leaderstats.Points
function buy()
if leaderboard.Value >= 5000 then
if not backpack:FindFirstChild('AK') and not startergear:FindFirstChild('AK') then
ak = game.Lighting.AK:clone()
ak.Parent = backpack
for _, v in pairs(ak:GetChildren()) do
if v:IsA('BaseScript') then
v.Disabled = true
wait()
v.Disabled = false
end --if
end --for
uzi = game.Lighting.uzi --change to correct name
uzi:clone().Parent = startergear
leaderboard.Value = leaderboard.Value - 5000
end --if n
end --if l
end --function
script.Parent.MouseButton1Down:connect(buy)
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