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: I don't see whats wrong with my Shop Dialog Script?

Previous Thread :: Next Thread 
IntelPhilosophy is not online. IntelPhilosophy
Joined: 05 Jun 2012
Total Posts: 285
12 Jul 2012 10:50 AM
So i have this script:

script.Parent.DialogChoiceSelected:connect(function(player, choice)
if (choice == script.Parent.Choice1) then
if (player.leaderstats.Credits.Value >= 1200) then
gun = game.Lighting["M16A4"]:clone()
gun.Parent = player.Backpack
player.leaderstats.Credits.Value = player.leaderstats.Credits.Value - 1200
script.Parent.Choice1.ResponseDialog = "Have a nice day!"
else
script.Parent.Choice1.ResponseDialog = "You don't have enough credits!"
end
return
end
-----------------------------------------------------------------------
I copy and paste this short peice of code to make it a much bigger peice of code, so I have multiple weapons, and multiple Values, and such. This first peice requires 3 ends, but I put the third end at the very last line of code. When I copy it I copy from the second line down. The script does not work. I need some help, can someone help me please?!
Report Abuse
IntelPhilosophy is not online. IntelPhilosophy
Joined: 05 Jun 2012
Total Posts: 285
12 Jul 2012 10:56 AM
Help please?
Report Abuse
GreenDay987 is not online. GreenDay987
Joined: 21 May 2011
Total Posts: 7027
12 Jul 2012 10:59 AM
Any output?
Report Abuse
IntelPhilosophy is not online. IntelPhilosophy
Joined: 05 Jun 2012
Total Posts: 285
12 Jul 2012 11:01 AM
No.
Report Abuse
IntelPhilosophy is not online. IntelPhilosophy
Joined: 05 Jun 2012
Total Posts: 285
12 Jul 2012 11:03 AM
I don't know why it doesn't work. It looks all fine to me, but when I test it all out, it won't work.
Report Abuse
IntelPhilosophy is not online. IntelPhilosophy
Joined: 05 Jun 2012
Total Posts: 285
12 Jul 2012 11:07 AM
The entire script is this:
script.Parent.DialogChoiceSelected:connect(function(player, choice)
if (choice == script.Parent.Choice1) then
if (player.leaderstats.Credits.Value >= 1200) then
gun = game.Lighting["M16A4"]:clone()
gun.Parent = player.Backpack
player.leaderstats.Credits.Value = player.leaderstats.Credits.Value - 1200
script.Parent.Choice1.ResponseDialog = "Have a nice day!"
else
script.Parent.Choice1.ResponseDialog = "You don't have enough credits!"
end
return
end
if (choice == script.Parent.Choice2) then
if (player.leaderstats.Credits.Value >= 1550) then
gun = game.Lighting["M249SAW"]:clone()
gun.Parent = player.Backpack
player.leaderstats.Credits.Value = player.leaderstats.Credits.Value - 1550
script.Parent.Choice2.ResponseDialog = "Have a nice day!"
else
script.Parent.Choice2.ResponseDialog = "You don't have enough credits!"
end
return
end
if (choice == script.Parent.Choice3) then
if (player.leaderstats.Credits.Value >= 350) then
gun = game.Lighting["RiotSheild"]:clone()
gun.Parent = player.Backpack
player.leaderstats.Credits.Value = player.leaderstats.Credits.Value - 350
script.Parent.Choice2.ResponseDialog = "Have a nice day!"
else
script.Parent.Choice2.ResponseDialog = "You don't have enough credits!"
end
return
end
if (choice == script.Parent.Choice4) then
if (player.leaderstats.Credits.Value >= 700) then
gun = game.Lighting["MP5"]:clone()
gun.Parent = player.Backpack
player.leaderstats.Credits.Value = player.leaderstats.Credits.Value - 700
script.Parent.Choice2.ResponseDialog = "Have a nice day!"
else
script.Parent.Choice2.ResponseDialog = "You don't have enough credits!"
end
return
end
if (choice == script.Parent.Choice5) then
if (player.leaderstats.Credits.Value >= 500) then
gun = game.Lighting["AA12"]:clone()
gun.Parent = player.Backpack
player.leaderstats.Credits.Value = player.leaderstats.Credits.Value - 500
script.Parent.Choice2.ResponseDialog = "Have a nice day!"
else
script.Parent.Choice2.ResponseDialog = "You don't have enough credits!"
end
return
end
if (choice == script.Parent.Choice6) then
if (player.leaderstats.Credits.Value >= 1300) then
gun = game.Lighting["P90"]:clone()
gun.Parent = player.Backpack
player.leaderstats.Credits.Value = player.leaderstats.Credits.Value - 1300
script.Parent.Choice2.ResponseDialog = "Have a nice day!"
else
script.Parent.Choice2.ResponseDialog = "You don't have enough credits!"
end
return
end
if (choice == script.Parent.Choice5) then
if (player.leaderstats.Credits.Value >= 1700) then
gun = game.Lighting["M24"]:clone()
gun.Parent = player.Backpack
player.leaderstats.Credits.Value = player.leaderstats.Credits.Value - 1700
script.Parent.Choice2.ResponseDialog = "Have a nice day!"
else
script.Parent.Choice2.ResponseDialog = "You don't have enough credits!"
end
return
end
end)
Report Abuse
Candymaniac is not online. Candymaniac
Joined: 08 Oct 2009
Total Posts: 8985
12 Jul 2012 11:14 AM
Can you search for an error in the output?

☜▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬☜☆☞▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬☞ - Candymaniac, a highly reactive substance.
Report Abuse
IntelPhilosophy is not online. IntelPhilosophy
Joined: 05 Jun 2012
Total Posts: 285
12 Jul 2012 11:17 AM
The output doesn't say anything about the dialog.
Report Abuse
su8 is not online. su8
Joined: 06 Mar 2009
Total Posts: 6334
12 Jul 2012 11:18 AM
I doubt.
Report Abuse
IntelPhilosophy is not online. IntelPhilosophy
Joined: 05 Jun 2012
Total Posts: 285
12 Jul 2012 11:20 AM
Here is what the output says:
logging probability 0.97387615588855
not logging
10:55:25 - CApp::RobloxAuthenticate
10:55:26 - CWorkspace::DoExecScript
10:55:26 - DataModel Loading http://www.roblox.com/asset/?id=82738187
CmdUtl v3.0.0 loaded
LOG_WARNING: Tool "ObjectButton": No parts selected
LOG_WARNING: Tool "ObjectButton": No parts selected
LOG_WARNING: Tool "ObjectButton": No parts selected
12:15:34 - Handle is not a valid member of Tool
12:15:34 - Script "Workspace.Weapons.Knife.KnifeScript", Line 12
12:15:34 - stack end
12:15:34 - Handle is not a valid member of Tool
12:15:34 - Script "Workspace.Model.Model.Model.Tazmanian GreatAxe.Script", Line 8
12:15:34 - stack end
12:15:34 - Handle is not a valid member of Tool
12:15:34 - Script "Workspace.Model.Model.Model.Tazmanian GreatAxe.WeldScript", Line 19
12:15:34 - stack end
12:15:34 - Touched is not a valid member of Model
12:15:34 - Script "Workspace.Model.Model.Model.Tazmanian GreatAxe.PUT THIS IN ", Line 30
12:15:34 - stack end
12:15:34 - Touched is not a valid member of Model
12:15:34 - Script "Workspace.Model.Building Tools.PUT THIS IN THE WEAPON", Line 30
12:15:34 - stack end
12:15:34 - Handle is not a valid member of Tool
12:15:34 - Script "Workspace.Model.Model.Model.Tazmanian GreatAxe.Script", Line 8
12:15:34 - stack end
12:15:34 - Handle is not a valid member of Tool
12:15:34 - Script "Workspace.Model.Model.Model.Tazmanian GreatAxe.WeldScript", Line 19
12:15:34 - stack end
12:15:34 - Touched is not a valid member of Model
12:15:34 - Script "Workspace.Model.Model.Model.Tazmanian GreatAxe.PUT THIS IN ", Line 30
12:15:34 - stack end
12:15:34 - Touched is not a valid member of Model
12:15:34 - Script "Workspace.Model.Building Tools.PUT THIS IN THE WEAPON", Line 30
12:15:34 - stack end
12:15:34 - Weld should not be a child of Workspace.HueyModel.Huey.Engine
12:15:34 - Weld should not be a child of Workspace.HueyModel.Huey.Engine
12:15:34 - Weld should not be a child of Workspace.HueyModel.Huey.Engine
12:15:34 - Weld should not be a child of Workspace.HueyModel.Huey.Engine
12:15:34 - Weld should not be a child of Workspace.HueyModel.Huey.Engine
12:15:34 - Weld should not be a child of Workspace.HueyModel.Huey.Engine
12:15:34 - Weld should not be a child of Workspace.HueyModel.Huey.Engine
12:15:34 - Weld should not be a child of Workspace.HueyModel.Huey.Engine
12:15:34 - Weld should not be a child of Workspace.HueyModel.Huey.Engine
12:15:34 - Weld should not be a child of Workspace.HueyModel.Huey.Engine
12:15:34 - Weld should not be a child of Workspace.HueyModel.Huey.Engine
12:15:34 - Weld should not be a child of Workspace.HueyModel.Huey.Engine
12:15:34 - Weld should not be a child of Workspace.HueyModel.Huey.Engine
12:15:34 - Weld should not be a child of Workspace.HueyModel.Huey.Engine
12:15:34 - Weld should not be a child of Workspace.HueyModel.Huey.Engine
12:15:34 - Weld should not be a child of Workspace.HueyModel.Huey.Engine
12:15:34 - Weld should not be a child of Workspace.HueyModel.Huey.Engine
12:15:34 - Weld should not be a child of Workspace.HueyModel.Huey.Engine
12:15:34 - Weld should not be a child of Workspace.HueyModel.Huey.Engine
12:15:34 - Weld should not be a child of Workspace.HueyModel.Huey.Engine
12:15:34 - Weld should not be a child of Workspace.HueyModel.Huey.Engine
12:15:34 - Weld should not be a child of Workspace.HueyModel.Huey.Engine
12:15:34 - Weld should not be a child of Workspace.HueyModel.Huey.Engine
12:15:34 - Weld should not be a child of Workspace.HueyModel.Huey.Engine
12:15:34 - Weld should not be a child of Workspace.HueyModel.Huey.Engine
12:15:34 - Weld should not be a child of Workspace.HueyModel.Huey.Engine
12:15:34 - Weld should not be a child of Workspace.HueyModel.Huey.Engine
12:15:34 - Weld should not be a child of Workspace.HueyModel.Huey.Engine
12:15:34 - Weld should not be a child of Workspace.HueyModel.Huey.Engine
12:15:34 - Weld should not be a child of Workspace.HueyModel.Huey.Engine
12:15:34 - Weld should not be a child of Workspace.HueyModel.Huey.Engine
12:15:34 - Weld should not be a child of Workspace.HueyModel.Huey.Engine
12:15:34 - Weld should not be a child of Workspace.HueyModel.Huey.Engine
12:15:34 - Weld should not be a child of Workspace.HueyModel.Huey.Engine
12:15:34 - Weld should not be a child of Workspace.HueyModel.Huey.Engine
12:15:34 - Weld should not be a child of Workspace.HueyModel.Huey.Engine
12:15:34 - Weld should not be a child of Workspace.HueyModel.Huey.Engine
12:15:34 - Weld should not be a child of Workspace.HueyModel.Huey.Engine
12:15:34 - Weld should not be a child of Workspace.HueyModel.Huey.Engine
12:15:34 - Weld should not be a child of Workspace.HueyModel.Huey.Engine
12:15:34 - Weld should not be a child of Workspace.HueyModel.Huey.Engine
12:15:34 - Weld should not be a child of Workspace.HueyModel.Huey.Engine
12:15:34 - Weld should not be a child of Workspace.HueyModel.Huey.Engine
12:15:34 - Weld should not be a child of Workspace.HueyModel.Huey.Engine
12:15:34 - Weld should not be a child of Workspace.HueyModel.Huey.Engine
12:15:34 - Weld should not be a child of Workspace.HueyModel.Huey.Engine
12:15:34 - Weld should not be a child of Workspace.HueyModel.Huey.Engine
12:15:34 - Weld should not be a child of Workspace.HueyModel.Huey.Engine
12:15:34 - Weld should not be a child of Workspace.HueyModel.Huey.Engine
12:15:34 - Weld should not be a child of Workspace.HueyModel.Huey.Engine
12:15:34 - Weld should not be a child of Workspace.HueyModel.Huey.Engine
12:15:34 - Weld should not be a child of Workspace.HueyModel.Huey.Engine
12:15:34 - Weld should not be a child of Workspace.HueyModel.Huey.Engine
12:15:34 - Weld should not be a child of Workspace.HueyModel.Huey.Engine
12:15:34 - Weld should not be a child of Workspace.HueyModel.Huey.Engine
12:15:34 - Weld should not be a child of Workspace.HueyModel.Huey.Engine
12:15:34 - Weld should not be a child of Workspace.HueyModel.Huey.Engine
12:15:34 - Weld should not be a child of Workspace.HueyModel.Huey.Engine
12:15:34 - Weld should not be a child of Workspace.HueyModel.Huey.Engine
12:15:34 - Weld should not be a child of Workspace.HueyModel.Huey.Engine
12:15:34 - Weld should not be a child of Workspace.HueyModel.Huey.Engine
12:15:34 - Weld should not be a child of Workspace.HueyModel.Huey.Engine
12:15:34 - Weld should not be a child of Workspace.HueyModel.Huey.Engine
12:15:34 - Weld should not be a child of Workspace.HueyModel.Huey.Engine
12:15:34 - Weld should not be a child of Workspace.HueyModel.Huey.Engine
12:15:34 - Weld should not be a child of Workspace.HueyModel.Huey.Engine
12:15:34 - Weld should not be a child of Workspace.HueyModel.Huey.Engine
12:15:34 - Weld should not be a child of Workspace.HueyModel.Huey.Engine
12:15:34 - Weld should not be a child of Workspace.HueyModel.Huey.Engine
12:15:34 - Weld should not be a child of Workspace.HueyModel.Huey.Engine
12:15:34 - Weld should not be a child of Workspace.HueyModel.Huey.Engine
12:15:34 - Weld should not be a child of Workspace.HueyModel.Huey.Engine
12:15:34 - Weld should not be a child of Workspace.HueyModel.Huey.Engine
12:15:34 - Weld should not be a child of Workspace.HueyModel.Huey.Engine
12:15:34 - Weld should not be a child of Workspace.HueyModel.Huey.Engine
12:15:34 - Weld should not be a child of Workspace.HueyModel.Huey.Engine
12:15:34 - Weld should not be a child of Workspace.HueyModel.Huey.Engine
12:15:34 - Weld should not be a child of Workspace.HueyModel.Huey.Engine
12:15:34 - Weld should not be a child of Workspace.HueyModel.Huey.Engine
12:15:34 - Weld should not be a child of Workspace.HueyModel.Huey.Engine
12:15:34 - Weld should not be a child of Workspace.HueyModel.Huey.Engine
12:15:34 - Weld should not be a child of Workspace.HueyModel.Huey.Engine
12:15:34 - Weld should not be a child of Workspace.HueyModel.Huey.Engine
12:15:34 - Weld should not be a child of Workspace.HueyModel.Huey.Engine
12:15:34 - Weld should not be a child of Workspace.HueyModel.Huey.Engine
12:15:34 - Weld should not be a child of Workspace.HueyModel.Huey.Engine
12:15:34 - Weld should not be a child of Workspace.HueyModel.Huey.Engine
12:15:34 - Weld should not be a child of Workspace.HueyModel.Huey.Engine
12:15:34 - Weld should not be a child of Workspace.HueyModel.Huey.Engine
12:15:34 - Weld should not be a child of Workspace.HueyModel.Huey.Engine
12:15:34 - Weld should not be a child of Workspace.HueyModel.Huey.Engine
12:15:34 - Weld should not be a child of Workspace.HueyModel.Huey.Engine
12:15:34 - Weld should not be a child of Workspace.HueyModel.Huey.Engine
12:15:34 - Weld should not be a child of Workspace.HueyModel.Huey.Engine
12:15:34 - Weld should not be a child of Workspace.HueyModel.Huey.Engine
12:15:34 - Weld should not be a child of Workspace.HueyModel.Huey.Engine
12:15:34 - Weld should not be a child of Workspace.HueyModel.Huey.Engine
12:15:34 - Weld should not be a child of Workspace.HueyModel.Huey.Engine
12:15:34 - Weld should not be a child of Workspace.HueyModel.Huey.Engine
12:15:34 - Weld should not be a child of Workspace.HueyModel.Huey.Engine
12:15:34 - Weld should not be a child of Workspace.HueyModel.Huey.Engine
12:15:34 - Turret should not be a child of Workspace.TankModel.Tank
12:15:34 - CannonMotor should not be a child of Workspace.TankModel.Tank
Cash Leaderboard Loaded
Report Abuse
Xnite515 is not online. Xnite515
Joined: 18 Feb 2011
Total Posts: 22763
12 Jul 2012 11:30 AM
script.Parent.DialogChoiceSelected:connect(function(player, choice)

End)
Report Abuse
IntelPhilosophy is not online. IntelPhilosophy
Joined: 05 Jun 2012
Total Posts: 285
12 Jul 2012 11:31 AM
So like this?

script.Parent.DialogChoiceSelected:connect(function(player, choice)

end)

if (choice == script.Parent.Choice1) then
if (player.leaderstats.Credits.Value >= 1200) then
gun = game.Lighting["M16A4"]:clone()
gun.Parent = player.Backpack
player.leaderstats.Credits.Value = player.leaderstats.Credits.Value - 1200
script.Parent.Choice1.ResponseDialog = "Have a nice day!"
else
script.Parent.Choice1.ResponseDialog = "You don't have enough credits!"
end
return
Report Abuse
icanxlr8 is not online. icanxlr8
Joined: 25 Feb 2009
Total Posts: 3686
12 Jul 2012 11:34 AM
I think the end) goes at the end of the script.
Report Abuse
IntelPhilosophy is not online. IntelPhilosophy
Joined: 05 Jun 2012
Total Posts: 285
12 Jul 2012 11:36 AM
Originially, it would. But doing it that way makes the script not work. The entire script is in the forum thread, and the end) is all the way at the bottom.
Report Abuse
Xnite515 is not online. Xnite515
Joined: 18 Feb 2011
Total Posts: 22763
12 Jul 2012 11:36 AM
end) would go all the way down.
Report Abuse
pwnedu46 is not online. pwnedu46
Joined: 23 May 2009
Total Posts: 7534
12 Jul 2012 11:38 AM
Try this:

script.Parent.DialogChoiceSelected:connect(function(player, choice)

print("A dialog was selected.")
print("Player: " .. player.Name)
print("Choice: " .. choice.Name)

if (choice.Name == "Choice1") then
if (player.leaderstats.Credits.Value >= 1200) then
gun = game.Lighting["M16A4"]:clone()
gun.Parent = player.Backpack
player.leaderstats.Credits.Value = player.leaderstats.Credits.Value - 1200
script.Parent.Choice1.ResponseDialog = "Have a nice day!"
else
script.Parent.Choice1.ResponseDialog = "You don't have enough credits!"
end
return

elseif (choice.Name == "Choice2") then
if (player.leaderstats.Credits.Value >= 1550) then
gun = game.Lighting["M249SAW"]:clone()
gun.Parent = player.Backpack
player.leaderstats.Credits.Value = player.leaderstats.Credits.Value - 1550
script.Parent.Choice2.ResponseDialog = "Have a nice day!"
else
script.Parent.Choice2.ResponseDialog = "You don't have enough credits!"
end
return

elseif (choice.Name == "Choice3") then
if (player.leaderstats.Credits.Value >= 350) then
gun = game.Lighting["RiotSheild"]:clone()
gun.Parent = player.Backpack
player.leaderstats.Credits.Value = player.leaderstats.Credits.Value - 350
script.Parent.Choice2.ResponseDialog = "Have a nice day!"
else
script.Parent.Choice2.ResponseDialog = "You don't have enough credits!"
end
return

elseif (choice.Name == "Choice4") then
if (player.leaderstats.Credits.Value >= 700) then
gun = game.Lighting["MP5"]:clone()
gun.Parent = player.Backpack
player.leaderstats.Credits.Value = player.leaderstats.Credits.Value - 700
script.Parent.Choice2.ResponseDialog = "Have a nice day!"
else
script.Parent.Choice2.ResponseDialog = "You don't have enough credits!"
end
return

elseif (choice.Name == "Choice5") then
if (player.leaderstats.Credits.Value >= 500) then
gun = game.Lighting["AA12"]:clone()
gun.Parent = player.Backpack
player.leaderstats.Credits.Value = player.leaderstats.Credits.Value - 500
script.Parent.Choice2.ResponseDialog = "Have a nice day!"
else
script.Parent.Choice2.ResponseDialog = "You don't have enough credits!"
end
return

elseif (choice.Name == "Choice6") then
if (player.leaderstats.Credits.Value >= 1300) then
gun = game.Lighting["P90"]:clone()
gun.Parent = player.Backpack
player.leaderstats.Credits.Value = player.leaderstats.Credits.Value - 1300
script.Parent.Choice2.ResponseDialog = "Have a nice day!"
else
script.Parent.Choice2.ResponseDialog = "You don't have enough credits!"
end
return

elseif (choice.Name == "Choice5") then
if (player.leaderstats.Credits.Value >= 1700) then
gun = game.Lighting["M24"]:clone()
gun.Parent = player.Backpack
player.leaderstats.Credits.Value = player.leaderstats.Credits.Value - 1700
script.Parent.Choice2.ResponseDialog = "Have a nice day!"
else
script.Parent.Choice2.ResponseDialog = "You don't have enough credits!"
end
return
else
print("None of the options were selected.")
end

end)
Report Abuse
IntelPhilosophy is not online. IntelPhilosophy
Joined: 05 Jun 2012
Total Posts: 285
12 Jul 2012 11:38 AM
So like this?
script.Parent.DialogChoiceSelected:connect(function(player, choice)
if (choice == script.Parent.Choice1) then
if (player.leaderstats.Credits.Value >= 1200) then
gun = game.Lighting["M16A4"]:clone()
gun.Parent = player.Backpack
player.leaderstats.Credits.Value = player.leaderstats.Credits.Value - 1200
script.Parent.Choice1.ResponseDialog = "Have a nice day!"
else
script.Parent.Choice1.ResponseDialog = "You don't have enough credits!"
end
return
end
if (choice == script.Parent.Choice2) then
if (player.leaderstats.Credits.Value >= 1550) then
gun = game.Lighting["M249SAW"]:clone()
gun.Parent = player.Backpack
player.leaderstats.Credits.Value = player.leaderstats.Credits.Value - 1550
script.Parent.Choice2.ResponseDialog = "Have a nice day!"
else
script.Parent.Choice2.ResponseDialog = "You don't have enough credits!"
end
return
end
if (choice == script.Parent.Choice3) then
if (player.leaderstats.Credits.Value >= 350) then
gun = game.Lighting["RiotSheild"]:clone()
gun.Parent = player.Backpack
player.leaderstats.Credits.Value = player.leaderstats.Credits.Value - 350
script.Parent.Choice2.ResponseDialog = "Have a nice day!"
else
script.Parent.Choice2.ResponseDialog = "You don't have enough credits!"
end
return
end
if (choice == script.Parent.Choice4) then
if (player.leaderstats.Credits.Value >= 700) then
gun = game.Lighting["MP5"]:clone()
gun.Parent = player.Backpack
player.leaderstats.Credits.Value = player.leaderstats.Credits.Value - 700
script.Parent.Choice2.ResponseDialog = "Have a nice day!"
else
script.Parent.Choice2.ResponseDialog = "You don't have enough credits!"
end
return
end
if (choice == script.Parent.Choice5) then
if (player.leaderstats.Credits.Value >= 500) then
gun = game.Lighting["AA12"]:clone()
gun.Parent = player.Backpack
player.leaderstats.Credits.Value = player.leaderstats.Credits.Value - 500
script.Parent.Choice2.ResponseDialog = "Have a nice day!"
else
script.Parent.Choice2.ResponseDialog = "You don't have enough credits!"
end
return
end
if (choice == script.Parent.Choice6) then
if (player.leaderstats.Credits.Value >= 1300) then
gun = game.Lighting["P90"]:clone()
gun.Parent = player.Backpack
player.leaderstats.Credits.Value = player.leaderstats.Credits.Value - 1300
script.Parent.Choice2.ResponseDialog = "Have a nice day!"
else
script.Parent.Choice2.ResponseDialog = "You don't have enough credits!"
end
return
end
if (choice == script.Parent.Choice5) then
if (player.leaderstats.Credits.Value >= 1700) then
gun = game.Lighting["M24"]:clone()
gun.Parent = player.Backpack
player.leaderstats.Credits.Value = player.leaderstats.Credits.Value - 1700
script.Parent.Choice2.ResponseDialog = "Have a nice day!"
else
script.Parent.Choice2.ResponseDialog = "You don't have enough credits!"
end
return
end
end)
Report Abuse
NB3 is not online. NB3
Joined: 27 Dec 2009
Total Posts: 537
12 Jul 2012 11:43 AM
Yes.

- Two letters, one number. Yus, i'm in Roblox Archiects and Legendary Archiects of Robloxia
Report Abuse
IntelPhilosophy is not online. IntelPhilosophy
Joined: 05 Jun 2012
Total Posts: 285
12 Jul 2012 11:43 AM
Okay. I'll see if this works.
Report Abuse
pwnedu46 is not online. pwnedu46
Joined: 23 May 2009
Total Posts: 7534
12 Jul 2012 11:48 AM
"I think the end) goes at the end of the script."

Yes it does. The end closes the anonymous function, and the parenthesis closes the opening parenthesis after "connect".
Report Abuse
IntelPhilosophy is not online. IntelPhilosophy
Joined: 05 Jun 2012
Total Posts: 285
12 Jul 2012 11:55 AM
Okay. I edited all the figures that required the Dialog and its script, and so now my game can resume the Beta Testing. Now I have to add in a few requests.
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