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: attempt to index local 'value' (a string value)

Previous Thread :: Next Thread 
Syncretic is not online. Syncretic
Joined: 25 Dec 2008
Total Posts: 11662
07 Oct 2014 05:40 PM
What does this mean?
Any answers are appreciated.
Report Abuse
swimguy777 is not online. swimguy777
Joined: 30 May 2009
Total Posts: 17092
07 Oct 2014 05:47 PM
Post the script

-[::ƧѡÎḾḠΰῩ::]-[::Helper of Scripting and Writer of Wikis::]
Report Abuse
Syncretic is not online. Syncretic
Joined: 25 Dec 2008
Total Posts: 11662
07 Oct 2014 05:49 PM
i wont post the whole thing but I'll post where it comes from

local function write(Text, value)
value= value
for Incr = 1, string.len(Text) do
wait(0.05)
value.Text = Text:sub(1, Incr) .. "_"
end
value.Text = Text
end

MAIN.PlayerStuff:TweenPosition(UDim2.new(0.5, 0, 0.5, 0), "Out", "Quad", 1)
wait(.5)
Typewrite("PLAYER", MAIN.PlayerStuff.GuiPart1.Name)
wait(.5)
Report Abuse
Sinblade is not online. Sinblade
Joined: 14 Aug 2010
Total Posts: 2782
07 Oct 2014 06:02 PM
value.Text = "Text" it is a string so it needs quotes
Report Abuse
Syncretic is not online. Syncretic
Joined: 25 Dec 2008
Total Posts: 11662
07 Oct 2014 06:11 PM
^ that's not it because the function works until it's used in the specific area i posted
Report Abuse
Syncretic is not online. Syncretic
Joined: 25 Dec 2008
Total Posts: 11662
09 Oct 2014 04:47 PM
hnng
Report Abuse
darthpyro is not online. darthpyro
Joined: 18 Aug 2009
Total Posts: 3569
09 Oct 2014 04:50 PM
local function write(text, value)
value = value -- Not sure what this is about?
for Incr = 1, string.len(text) do
wait(0.05)
value.Text = text:sub(1, Incr) .. "_"
end
value.Text = text
end


Please try to be more careful with your variable and parameters in the future. I think having a variable with the same name as a property can cause issues.
Report Abuse
Goulstem is not online. Goulstem
Joined: 04 Jul 2012
Total Posts: 7177
09 Oct 2014 05:19 PM
Le ~ tostring(Text)
Report Abuse
128GB is not online. 128GB
Joined: 17 Apr 2014
Total Posts: 8056
09 Oct 2014 05:21 PM
local function write(Text, value)
Typewrite("PLAYER", MAIN.PlayerStuff.GuiPart1.Name)




function write()
Typewrite()


write
Typewrite
Report Abuse
darthpyro is not online. darthpyro
Joined: 18 Aug 2009
Total Posts: 3569
09 Oct 2014 05:23 PM
Gigabyte has a really great point, lol. But I'd like to point out that saying

value = value

Is pointless and would probably be your issue, assuming you've posted the whole script. You're trying to set the value parameter from that function (a string) to a string value. But a string is not a variable. So it's breaking.

Which is why you need to know how to name things when you're scripting!
Report Abuse
eLunate is not online. eLunate
Joined: 29 Jul 2014
Total Posts: 13268
09 Oct 2014 05:24 PM
Problem is, you don't need that value = value at the start, and whatever is being passed to the function as the second argument is nil.
Report Abuse
eLunate is not online. eLunate
Joined: 29 Jul 2014
Total Posts: 13268
09 Oct 2014 05:25 PM
Darth, a string is a variable :(
Report Abuse
darthpyro is not online. darthpyro
Joined: 18 Aug 2009
Total Posts: 3569
09 Oct 2014 05:26 PM
I still think that's the issue.
Report Abuse
eLunate is not online. eLunate
Joined: 29 Jul 2014
Total Posts: 13268
09 Oct 2014 05:29 PM
The real issue is that value (The second argument) is nil, so once you start trying to get any properties from it, it will spit an error at you because it's not a table (Or doesn't have an underlying C metamethod) and therefor cannot read/write that variable
Report Abuse
eLunate is not online. eLunate
Joined: 29 Jul 2014
Total Posts: 13268
09 Oct 2014 05:30 PM
Sorry sorry what am I saying. I mean it's a string, and strings aren't tables and don't have underlying C metatables blah blah blah I'm tired please forgive
Report Abuse
darthpyro is not online. darthpyro
Joined: 18 Aug 2009
Total Posts: 3569
09 Oct 2014 05:31 PM
... Wait. He's trying to change the text property ... inside the name property? This script has stupid written on every line lol
Report Abuse
eLunate is not online. eLunate
Joined: 29 Jul 2014
Total Posts: 13268
09 Oct 2014 05:33 PM
Yep.
That's exactly why it's not working and I was like oh my... What was he thinking? But you know it'a far nicer to explain what is wrong than point it out (No it's not)
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