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: whats wrong with my script?

Previous Thread :: Next Thread 
imike218 is not online. imike218
Joined: 28 Nov 2010
Total Posts: 350
01 Feb 2012 08:15 PM
local nameoftool = "Dance!"
local responseA = "Heres the dance tool."
local responseB = "You already have the dance tool!"


function onSelect(plyr,Give)

if Give.Name == "Give" then
if plyr.Backpack:findFirstChild(tostring(nameoftool)) == nil then

local tool = game.Lighting:findFirstChild(nameoftool):clone()
tool.Parent = plyr.Backpack
Give.ResponseDialog = (tostring(responseA))

elseif plyr.Backpack:findFirstChild(tostring(nameoftool)) ~= nil then

Give.ResponseDialog = (tostring(responseB))

end
end
end

script.Parent.Parent.DialogChoiceSelected:connect(onSelect)
Report Abuse
imike218 is not online. imike218
Joined: 28 Nov 2010
Total Posts: 350
01 Feb 2012 08:16 PM
bump. plz guys i need help
Report Abuse
soccaboy17 is not online. soccaboy17
Joined: 22 Sep 2009
Total Posts: 3161
01 Feb 2012 08:17 PM
Are you sure the tool is in the lighting service?
Report Abuse
imike218 is not online. imike218
Joined: 28 Nov 2010
Total Posts: 350
01 Feb 2012 08:26 PM
yes. if im correct it goes under lighting right?
Report Abuse
soccaboy17 is not online. soccaboy17
Joined: 22 Sep 2009
Total Posts: 3161
01 Feb 2012 08:31 PM
Yes, and make sure it has that EXACT name.
Report Abuse
soccaboy17 is not online. soccaboy17
Joined: 22 Sep 2009
Total Posts: 3161
01 Feb 2012 08:33 PM
Also, make sure the Dialog is script.Parent.Parent.Dialog.
Report Abuse
soccaboy17 is not online. soccaboy17
Joined: 22 Sep 2009
Total Posts: 3161
01 Feb 2012 08:33 PM
The Dialog should be the parent of the scripts, parent
Report Abuse
imike218 is not online. imike218
Joined: 28 Nov 2010
Total Posts: 350
01 Feb 2012 08:41 PM
that seems to be the problem. fixed with your suggestions of
script.Parent.Parent.Dialog.
Report Abuse
soccaboy17 is not online. soccaboy17
Joined: 22 Sep 2009
Total Posts: 3161
01 Feb 2012 08:49 PM
Mkay.
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