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: This is one weird output...

Previous Thread :: Next Thread 
CeaselessSoul is not online. CeaselessSoul
Joined: 03 Jul 2012
Total Posts: 7506
24 Aug 2012 08:05 PM
script.Parent.DialogChoiceSelected:connect(function(plr,choice)
if choice.Name == "Sword" and plr and not plr.leaderstats["Successful Shots"].Value >= 30 then script.Parent.Sword.ResponseDialog = "Not enough." end
end)

The if statement, the output says:


21:04:53 - Workspace.NPC.Head.Dialog.Dialog Script:10: attempt to compare number with boolean
21:04:53 - Script "Workspace.NPC.Head.Dialog.Dialog Script", Line 10
21:04:53 - stack end
21:04:53 - Disconnected event because of exception

Line 10 is the if statement. I don't get what they are saying...
Report Abuse
CeaselessSoul is not online. CeaselessSoul
Joined: 03 Jul 2012
Total Posts: 7506
24 Aug 2012 08:07 PM
Bump...
Report Abuse
dave2011 is not online. dave2011
Joined: 02 Oct 2010
Total Posts: 10581
24 Aug 2012 08:08 PM
30 is a number
and im guessing your leaderstat value is a Boolean value, if it isnt then i have no idea what is wrong
Report Abuse
CeaselessSoul is not online. CeaselessSoul
Joined: 03 Jul 2012
Total Posts: 7506
24 Aug 2012 08:09 PM
IntValue.
Report Abuse
CeaselessSoul is not online. CeaselessSoul
Joined: 03 Jul 2012
Total Posts: 7506
24 Aug 2012 08:09 PM
A BoolValue would break it...
Report Abuse
CeaselessSoul is not online. CeaselessSoul
Joined: 03 Jul 2012
Total Posts: 7506
24 Aug 2012 08:12 PM
Come on.
Report Abuse
TheEpicSamuri is not online. TheEpicSamuri
Joined: 04 Dec 2011
Total Posts: 1343
24 Aug 2012 08:18 PM
script.Parent.DialogChoiceSelected:connect(function(plr,choice)
if choice.Name == "Sword" and plr.leaderstats["Successful Shots"].Value >= 30 then script.Parent.Sword.ResponseDialog = "Not enough."
end
end)
Report Abuse
KnightmareXD is not online. KnightmareXD
Joined: 14 Jul 2009
Total Posts: 11189
24 Aug 2012 08:31 PM
    not plr.leaderstats["Successful Shots"].Value ​>= 30

Just do:

(if) plr.leaderstats["Successful Shots"].Value < 30

¤¤ †KMXD† ¤¤ [SHG Tier~3]
Report Abuse
CeaselessSoul is not online. CeaselessSoul
Joined: 03 Jul 2012
Total Posts: 7506
24 Aug 2012 08:32 PM
I did, but in online mode it doesn't do that, it just still says the actually response.
Report Abuse
vampire2512 is not online. vampire2512
Joined: 29 Dec 2009
Total Posts: 323
24 Aug 2012 09:02 PM
I hate trolling scripts that don't work in Online Mode. It ruined my old Titanic game. >:c
Report Abuse
KnightmareXD is not online. KnightmareXD
Joined: 14 Jul 2009
Total Posts: 11189
24 Aug 2012 09:04 PM
^LOL U should ask "swimguy777" about scripts that don't work online.

¤¤ †KMXD† ¤¤ [SHG Tier~3]
Report Abuse
swimguy777 is not online. swimguy777
Joined: 30 May 2009
Total Posts: 17092
24 Aug 2012 09:09 PM
Shut up Knight :(

-[::ƧѡÎḾḠΰῩ::]-[::Maker of stuff and Helper of Scripting::]-
Report Abuse
CeaselessSoul is not online. CeaselessSoul
Joined: 03 Jul 2012
Total Posts: 7506
24 Aug 2012 09:30 PM
I started laughing, XD.
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