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: Making a string reference a variable

Previous Thread :: Next Thread 
XAXA is not online. XAXA
Joined: 10 Aug 2008
Total Posts: 6315
28 Oct 2013 12:39 PM
local mo = Instance.new("Model", workspace)
local p = Instance.new("Part", "mo") -- How do I make the second argument "work"? It has to still use a string.
Report Abuse
crazyman32 is not online. crazyman32
Joined: 13 Apr 2008
Total Posts: 18027
28 Oct 2013 02:20 PM
Get rid of the quotations:

local p = Instance.new("Part", mo)
Report Abuse
XAXA is not online. XAXA
Joined: 10 Aug 2008
Total Posts: 6315
28 Oct 2013 02:20 PM
It *has* to use a string.
Report Abuse
Kirbykid02 is not online. Kirbykid02
Joined: 18 May 2009
Total Posts: 2671
28 Oct 2013 02:22 PM
Why does it 'have' to?
Report Abuse
crazyman32 is not online. crazyman32
Joined: 13 Apr 2008
Total Posts: 18027
28 Oct 2013 02:23 PM
No it does not have to use a string. In fact, it CAN'T use a string. The second argument MUST be an Instance userdata object.
Report Abuse
chickenman158 is not online. chickenman158
Joined: 18 Jan 2011
Total Posts: 915
28 Oct 2013 02:29 PM
loadstring("return"..string.."") -- Haxy method. There must be a better way?

You have a flaw in your planning, you will need to try another method. Also, XAXA, I need some help with animations, if you could PM me it would be appreciated.
Report Abuse
XAXA is not online. XAXA
Joined: 10 Aug 2008
Total Posts: 6315
28 Oct 2013 02:37 PM
For my purposes, I want to use a string because I want to concatenate a table of strings to it, to shorten my code.
Report Abuse
crazyman32 is not online. crazyman32
Joined: 13 Apr 2008
Total Posts: 18027
28 Oct 2013 03:44 PM
Shortened code doesn't matter if it just makes the code slower
Report Abuse
XAXA is not online. XAXA
Joined: 10 Aug 2008
Total Posts: 6315
28 Oct 2013 03:47 PM
Welp. I suppose.
Report Abuse
yoshimaster240102 is not online. yoshimaster240102
Joined: 14 Apr 2012
Total Posts: 470
28 Oct 2013 03:48 PM
Um..
Wha?




~I Stole your cookies
Report Abuse
Jetta765214 is not online. Jetta765214
Joined: 22 Oct 2008
Total Posts: 1855
28 Oct 2013 04:20 PM
Check your inbox, my post was blocked by the post, due to "Breaking rules", really wish they would fix that.
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