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
 

Re: Changing text through a value?

Previous Thread :: Next Thread 
Leveraged is not online. Leveraged
Joined: 23 Jul 2010
Total Posts: 11564
24 Jun 2015 06:52 PM
p = script.Parent
v = script.Parent.Value
p.Text = "Flashlight Power: "..v.Value""

Not quite sure how to do this..


~ Xucs/Tixmaker101/Scuc | + 55k Posts ~
Report Abuse
Leveraged is not online. Leveraged
Joined: 23 Jul 2010
Total Posts: 11564
24 Jun 2015 06:53 PM
1


~ Xucs/Tixmaker101/Scuc | + 55k Posts ~
Report Abuse
Zenuvius is not online. Zenuvius
Joined: 26 Aug 2014
Total Posts: 551
24 Jun 2015 06:54 PM
p = script.Parent
v = script.Parent.Value
p.Text = "Flashlight Power: "..v.Value..""
Report Abuse
masterblokz is not online. masterblokz
Joined: 17 Nov 2010
Total Posts: 9517
24 Jun 2015 06:54 PM
that'd work just remove the "" at the end
Report Abuse
Zenuvius is not online. Zenuvius
Joined: 26 Aug 2014
Total Posts: 551
24 Jun 2015 06:55 PM
that's correct already assuming that script.Parent.Value exists :/

Anything on the output ?
Report Abuse
Leveraged is not online. Leveraged
Joined: 23 Jul 2010
Total Posts: 11564
24 Jun 2015 06:56 PM
Yes, here's the output.

Players.Player.PlayerGui.ScreenGui.TextLabel.Value:3: attempt to call field 'Value' (a number value)


~ Xucs/Tixmaker101/Scuc | + 55k Posts ~
Report Abuse
Leveraged is not online. Leveraged
Joined: 23 Jul 2010
Total Posts: 11564
24 Jun 2015 06:57 PM
idk

i thought it would work


~ Xucs/Tixmaker101/Scuc | + 55k Posts ~
Report Abuse
Leveraged is not online. Leveraged
Joined: 23 Jul 2010
Total Posts: 11564
24 Jun 2015 07:01 PM
qq


~ Xucs/Tixmaker101/Scuc | + 55k Posts ~
Report Abuse
ehern11 is not online. ehern11
Joined: 23 Apr 2011
Total Posts: 1541
24 Jun 2015 07:03 PM
p = script.Parent
v = p.Value
p.Text = "Flashlight Power: "..v.Value
Report Abuse
Leveraged is not online. Leveraged
Joined: 23 Jul 2010
Total Posts: 11564
24 Jun 2015 07:27 PM
Nothing seems to work, and it always says it's an error trying to access the numbervalue...


~ Xucs/Tixmaker101/Scuc | + 55k Posts ~
Report Abuse
TimeTicks is not online. TimeTicks
Joined: 27 Apr 2011
Total Posts: 27115
24 Jun 2015 07:28 PM
Either your hierarchy is wrong or tostring(v.Value)
Report Abuse
TimeTicks is not online. TimeTicks
Joined: 27 Apr 2011
Total Posts: 27115
24 Jun 2015 07:30 PM
p = script.Parent
p.Text = "Flashlight power:"..p.Value
Report Abuse
TimeTicks is not online. TimeTicks
Joined: 27 Apr 2011
Total Posts: 27115
24 Jun 2015 07:31 PM
sht typos everywhere. disregard my post above
Report Abuse
Leveraged is not online. Leveraged
Joined: 23 Jul 2010
Total Posts: 11564
24 Jun 2015 07:32 PM
@time

already tried it, here's output


19:31:45.104 - Players.Player.PlayerGui.ScreenGui.TextLabel.Valcheck:2: attempt to concatenate field 'Value' (a userdata value)


~ Xucs/Tixmaker101/Scuc | + 55k Posts ~
Report Abuse
TimeTicks is not online. TimeTicks
Joined: 27 Apr 2011
Total Posts: 27115
24 Jun 2015 07:32 PM
What is your hierarchy?
Report Abuse
Leveraged is not online. Leveraged
Joined: 23 Jul 2010
Total Posts: 11564
24 Jun 2015 07:33 PM
Also tried something else:

p = script.Parent
v = p.Value
p.Text = "Flashlight power:"..v.Value



~ Xucs/Tixmaker101/Scuc | + 55k Posts ~
Report Abuse
Leveraged is not online. Leveraged
Joined: 23 Jul 2010
Total Posts: 11564
24 Jun 2015 07:33 PM
The hierarchy is correct, it's just erroring because it's a "number value"

It honestly should work...


~ Xucs/Tixmaker101/Scuc | + 55k Posts ~
Report Abuse
TimeTicks is not online. TimeTicks
Joined: 27 Apr 2011
Total Posts: 27115
24 Jun 2015 07:34 PM
And Please do not do this "Value.Value" the script will think the first value is a value.

Do this

p = script.Parent
val = p.Val
p.Text = "Flashlight power:"..val.Value
Report Abuse
Leveraged is not online. Leveraged
Joined: 23 Jul 2010
Total Posts: 11564
24 Jun 2015 07:34 PM
afk for a bit


~ Xucs/Tixmaker101/Scuc | + 55k Posts ~
Report Abuse
Leveraged is not online. Leveraged
Joined: 23 Jul 2010
Total Posts: 11564
24 Jun 2015 07:36 PM
still doesn't work, and no output...

p = script.Parent
val = p.Val
p.Text = "Flashlight power:"..val.Value


~ Xucs/Tixmaker101/Scuc | + 55k Posts ~
Report Abuse
TimeTicks is not online. TimeTicks
Joined: 27 Apr 2011
Total Posts: 27115
24 Jun 2015 07:38 PM
Well post a picture of the hierarchy in your tool/gui
Report Abuse
SenseiWarrior is not online. SenseiWarrior
Joined: 09 Apr 2011
Total Posts: 12140
24 Jun 2015 07:42 PM
Stop using p.Value.Value
Report Abuse
ehern11 is not online. ehern11
Joined: 23 Apr 2011
Total Posts: 1541
24 Jun 2015 08:06 PM
I tested the one I gave you and it worked
Report Abuse
Leveraged is not online. Leveraged
Joined: 23 Jul 2010
Total Posts: 11564
24 Jun 2015 09:33 PM
@eh

You obviously didn't, because it doesn't work for me, and I've tried that.

@Time

No, you don't understand.

My hierarchy is completely corrct.


~ Xucs/Tixmaker101/Scuc | + 55k Posts ~
Report Abuse
Leveraged is not online. Leveraged
Joined: 23 Jul 2010
Total Posts: 11564
24 Jun 2015 09:34 PM
heres the hierarchy anyways...


http://prntscr.com/7l0oif


~ Xucs/Tixmaker101/Scuc | + 55k Posts ~
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