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: Script help, please!

Previous Thread :: Next Thread 
FauxHawke is not online. FauxHawke
Joined: 08 Jun 2012
Total Posts: 2190
03 Jul 2014 11:42 PM
This script makes it so it says user's name, then in says bla bla bla etc., then it picks a random string to show on the text.(I had to put 1,2,3 and (filter problem :P) because the original text was stuff that the filter wouldn't allow, [nothing bad]) I thought it might be helpful to show the look in the explorer, so here it is:(remove spaces) ht tp ://i mgur com / ko JN XsS

CourtScene - just a background
Avatar - just an image and a script that puts your character appearance
(filter problem :P) - a textbox, the one having problems
Talk - my script that is messed up

Here's the script:
while true do
local text = script.Parent.Text
local talk = {
"1.",
"2.",
"3."
}
text = ""script.Parent.Parent.Parent.Parent.Name", you have been accused of "talk[math.random(1,#talk)]""
wait(3)
text = "This court finds you (filter problem :P) of your actions."
wait(3)
text = "You are sentenced to 3 months at Springcreek (filter problem :P) Facility."
wait(3)
text = "That may not a 'long' time, but it will be a (filter problem :P). You'll be lucky if you (filter problem :P)"
wait(3)
script.Parent.Visible = false
script.Parent.Parent.Avatar = false
break
end

Here's the output
WITH the 'script.Parent.Parent.Parent.Parent.Name':
23:23:13.996 - Players.Player1.PlayerGui.(filter problem :P).Judge.Talk:8: attempt to call field 'Name' (a string value)
WITHOUT the 'script.Parent.Parent.Parent.Parent.Name':
23:31:00.108 - Players.Player1.PlayerGui.(filter problem :P).Judge.Talk:8: attempt to call field '?' (a string value)

Any ideas? I promise, this is what happened, I didn't make any of this up. Can anyone help me? Please?
Report Abuse
FauxHawke is not online. FauxHawke
Joined: 08 Jun 2012
Total Posts: 2190
03 Jul 2014 11:42 PM
It took me an hour to get this thing around the filter.
Report Abuse
FauxHawke is not online. FauxHawke
Joined: 08 Jun 2012
Total Posts: 2190
03 Jul 2014 11:43 PM
If your confused, thank ROBLOX's dumb filter.
Report Abuse
FauxHawke is not online. FauxHawke
Joined: 08 Jun 2012
Total Posts: 2190
03 Jul 2014 11:48 PM
b1
Report Abuse
FauxHawke is not online. FauxHawke
Joined: 08 Jun 2012
Total Posts: 2190
03 Jul 2014 11:52 PM
b2
Report Abuse
AnonyAnonymous is not online. AnonyAnonymous
Joined: 23 Jun 2013
Total Posts: 6332
03 Jul 2014 11:54 PM
How exactly are you using "Name"?
Report Abuse
FauxHawke is not online. FauxHawke
Joined: 08 Jun 2012
Total Posts: 2190
03 Jul 2014 11:55 PM
All it is is the player's name.
Report Abuse
AnonyAnonymous is not online. AnonyAnonymous
Joined: 23 Jun 2013
Total Posts: 6332
03 Jul 2014 11:56 PM
Remove the quotation marks around "talk[math.random])"
Report Abuse
FauxHawke is not online. FauxHawke
Joined: 08 Jun 2012
Total Posts: 2190
03 Jul 2014 11:58 PM
It puts it as the string...
Report Abuse
AnonyAnonymous is not online. AnonyAnonymous
Joined: 23 Jun 2013
Total Posts: 6332
03 Jul 2014 11:59 PM
That's not necessary as for instance,
talk[1] would select first child in the table.
Report Abuse
FauxHawke is not online. FauxHawke
Joined: 08 Jun 2012
Total Posts: 2190
04 Jul 2014 12:01 AM
I don't understand. When I remove them, it makes it purple so it's apart of the string.
Report Abuse
FauxHawke is not online. FauxHawke
Joined: 08 Jun 2012
Total Posts: 2190
04 Jul 2014 12:06 AM
b3
Report Abuse
AnonyAnonymous is not online. AnonyAnonymous
Joined: 23 Jun 2013
Total Posts: 6332
04 Jul 2014 12:08 AM
Let me explain, math.random will already pick a random string from the table you have, if you keep those quotation marks the script will think it's a string and won't choose anything from the table, additionally, it will be """" instead of just "".
Report Abuse
FauxHawke is not online. FauxHawke
Joined: 08 Jun 2012
Total Posts: 2190
04 Jul 2014 12:11 AM
I'm sorry, I still don't understand. I need help. I put 2 quotes on the side, and it joined the string.
Report Abuse
AnonyAnonymous is not online. AnonyAnonymous
Joined: 23 Jun 2013
Total Posts: 6332
04 Jul 2014 12:12 AM
Remove "All" of the quotation marks around,
"talk[math.random(1,#talk)]""
Report Abuse
FauxHawke is not online. FauxHawke
Joined: 08 Jun 2012
Total Posts: 2190
04 Jul 2014 12:15 AM
Okay..it joins into the string.
Report Abuse
FauxHawke is not online. FauxHawke
Joined: 08 Jun 2012
Total Posts: 2190
04 Jul 2014 12:15 AM
Ok I have to go.
Report Abuse
FauxHawke is not online. FauxHawke
Joined: 08 Jun 2012
Total Posts: 2190
04 Jul 2014 07:06 AM
b4
Report Abuse
AnonyAnonymous is not online. AnonyAnonymous
Joined: 23 Jun 2013
Total Posts: 6332
04 Jul 2014 07:08 AM
Show me the altered version of the script.
Report Abuse
FauxHawke is not online. FauxHawke
Joined: 08 Jun 2012
Total Posts: 2190
04 Jul 2014 09:40 AM
while true do
local text = script.Parent.Text
local talk = {
"robbery.",
"animal abuse.",
"murder."
}
text = ""script.Parent.Parent.Parent.Parent.Name", you have been accused of talk"[math.random(1,#talk)]""
wait(3)
text = "This court finds you GUILTY of your crime."
wait(3)
text = "You are sentenced to 3 months at Springcreek Correctional Facility."
wait(3)
text = "That may not a 'long' time, but it will be a HARD time. You'll be lucky if you survive."
wait(3)
script.Parent.Visible = false
script.Parent.Parent.Avatar = false
break
end

I didn't change anything, just tell me what to change.
Report Abuse
FauxHawke is not online. FauxHawke
Joined: 08 Jun 2012
Total Posts: 2190
04 Jul 2014 09:40 AM
I have no idea how that got around the filter.
Report Abuse
AnonyAnonymous is not online. AnonyAnonymous
Joined: 23 Jun 2013
Total Posts: 6332
04 Jul 2014 09:46 AM
while true do
local text = script.Parent.Text
local talk = {
"robbery.",
"animal abuse.",
"murder."
}
text = ""script.Parent.Parent.Parent.Parent.Name", you have been accused of talk[math.random(1,#talk)]
wait(3)
text = "This court finds you GUILTY of your crime."
wait(3)
text = "You are sentenced to 3 months at Springcreek Correctional Facility."
wait(3)
text = "That may not a 'long' time, but it will be a HARD time. You'll be lucky if you survive."
wait(3)
script.Parent.Visible = false
script.Parent.Parent.Avatar = false
break
end
Try this, I removed the quotation marks.
Report Abuse
FauxHawke is not online. FauxHawke
Joined: 08 Jun 2012
Total Posts: 2190
04 Jul 2014 09:47 AM
That's an unfinished string.
Report Abuse
AnonyAnonymous is not online. AnonyAnonymous
Joined: 23 Jun 2013
Total Posts: 6332
04 Jul 2014 09:49 AM
No, It will randomly choose one of the strings from the table based on your script, try using it and tell us if it works.
Report Abuse
FauxHawke is not online. FauxHawke
Joined: 08 Jun 2012
Total Posts: 2190
04 Jul 2014 09:51 AM
Like I said,
unfinished string near "", you have been accused of talk[math.random(1,#talk)]'
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