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 » Scripters
Home Search
 

why isnt this script working

Previous Thread :: Next Thread 
CosmicPigeon is not online. CosmicPigeon
Joined: 14 Oct 2012
Total Posts: 5978
04 Sep 2016 12:17 AM
it breaks at the if info.Text=="A place" then

place1 = game.Workspace.Place1.Value
villian1 = game.Workspace.Villian1.Value
object1 = game.Workspace.Object1.Value
hero1 = game.Workspace.Hero1.Value
AnswerGUI = script.Parent.Parent
info = AnswerGUI.Info
example = AnswerGUI.Example


function onButtonClicked()
if info.Text=="A place" then
place1=AnswerGUI.Entry.Text
info.Text="A villian"
example.Text="Example: The Joker, A robber"
if info.Text=="A villian" then
villian1=AnswerGUI.Entry.Text
info.Text="An object"
example.Text="Example: an orange, a toy"
end
end


script.Parent.MouseButton1Down:connect(onButtonClicked)



https://www.roblox.com/BC-R-1-item?id=422869492 https://www.roblox.com/BC-R-2-item?id=422869716 https://www.roblox.com/BC-R-3-item?id=422869880
Report Abuse
iYzarky is not online. iYzarky
Joined: 01 Jun 2009
Total Posts: 1271
04 Sep 2016 12:20 AM
Output doesn't show any error?


I don't even care hummie
Report Abuse
Julian_Orteil is not online. Julian_Orteil
Joined: 14 Aug 2012
Total Posts: 968
04 Sep 2016 12:20 AM
1. Errors?
2. Look at this:

function onButtonClicked()
if info.Text=="A place" then
place1=AnswerGUI.Entry.Text
info.Text="A villian"
example.Text="Example: The Joker, A robber"
if info.Text=="A villian" then
villian1=AnswerGUI.Entry.Text
info.Text="An object"
example.Text="Example: an orange, a toy"
end <--
end <--


Any descending code/blocks within another block SHOULD ALWAYS be indented.
1. For syntactical sense for the computer (the 'end' placement is what is likely breaking)
2. For the sake of comprehension


Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripters
   
 
   
  • 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