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 TextBox Text a Variable

Previous Thread :: Next Thread 
Arbeit is not online. Arbeit
Joined: 07 Jul 2011
Total Posts: 2179
27 Nov 2013 09:50 AM
First off, here's the code that has an issue.

Everything exists and all the parentage is correct.

script.Parent.givebutton.MouseButton1Click:connect(function(gui)
playername = script.Parent.givebox.Text
if game.Players:findFirstChild(playername) ~= nil then
receive = script.Parent.Parent.receivedframe:clone()
receive.sender.Value = giver.Name
receive.Name = "INPUT: " .. script.Parent.givebox.Text
receive.Parent = game.Players.playername.PlayerGui.frontdeskgui
receive.Visible = true
end
end)

The exact error is that "playername is not a valid member of Players".

Can I not use a variable like that, or must I do something else?
Report Abuse
einsteinK is not online. einsteinK
Joined: 22 May 2011
Total Posts: 1015
27 Nov 2013 10:06 AM
game.Players[playername].PlayerGui.frontdeskgui
Report Abuse
Arbeit is not online. Arbeit
Joined: 07 Jul 2011
Total Posts: 2179
27 Nov 2013 10:09 AM
Tried that, it returns an error, too.
Report Abuse
Arbeit is not online. Arbeit
Joined: 07 Jul 2011
Total Posts: 2179
27 Nov 2013 10:10 AM
Wait, nevermind, I see what I did wrong. Thanks, einstein.
Report Abuse
einsteinK is not online. einsteinK
Joined: 22 May 2011
Total Posts: 1015
27 Nov 2013 10:10 AM
which error? cuz the error you gave should be fixed with my code
Report Abuse
Arbeit is not online. Arbeit
Joined: 07 Jul 2011
Total Posts: 2179
27 Nov 2013 06:13 PM
It worked, but the problem now is that it doesn't work if more than one person is in the server..
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