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: Get TextBox?

Previous Thread :: Next Thread 
MightyDantheman is online. MightyDantheman
Joined: 06 May 2011
Total Posts: 5108
20 Oct 2015 03:10 PM
I'm trying to get the text that the player has written inside the TextBox, and then have the name (of which the player has typed into the TextBox) become the variable "player". Once the "Kill" button is clicked, the targeted player would die. Should I use a string instead, or is this just wrong?

Script:

function onClicked()
local find1 = script.Parent.Parent:FindFirstChild("Target_Player")
local find2 = find1.Text
local player = game.Players:FindFirstChild("find2")
player.Character:BreakJoints()
end
script.Parent.MouseButton1Click:connect(onClicked)
Report Abuse
MightyDantheman is online. MightyDantheman
Joined: 06 May 2011
Total Posts: 5108
20 Oct 2015 03:23 PM
bump.

~MightyDantheman
Report Abuse
JimmyChance is not online. JimmyChance
Joined: 01 Nov 2009
Total Posts: 3681
20 Oct 2015 03:26 PM
Take out the quotes surrounding 'find2' since it's the variable pointing to the TextBox's text. You might also want to check if the player exists as well before attempting to get the character.
Report Abuse
MightyDantheman is online. MightyDantheman
Joined: 06 May 2011
Total Posts: 5108
20 Oct 2015 03:37 PM
Thanks. I can't believe I missed that. x.x
Now it works fine. :P

~MightyDantheman
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