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: TextBox problem.

Previous Thread :: Next Thread 
blackboy167thst is not online. blackboy167thst
Joined: 22 Jul 2011
Total Posts: 2468
08 Oct 2012 12:05 PM
I am trying to make a spectate Gui and the player has to input the player's name that they want to spectate. The TextBox's Text at the moment is "Input Name". When I change it and try finding the text through a script, it is still "Input Name". How can I fix this?
Report Abuse
lil5050sux is not online. lil5050sux
Joined: 23 May 2011
Total Posts: 7
08 Oct 2012 12:06 PM
Text BUTTON and moveto? Look on wiki
Report Abuse
thecaptain97 is not online. thecaptain97
Joined: 17 Jun 2010
Total Posts: 4987
08 Oct 2012 12:06 PM
Are You checking StarterGui or PlayerGui?
Report Abuse
IHateMittRomney is not online. IHateMittRomney
Joined: 05 Oct 2012
Total Posts: 69
08 Oct 2012 12:07 PM
It didn't do that for me

--path

.TextBox.Text = --Text here

Make sure nothing else is name TextBox

~xXTheRobotXx,Machination
Report Abuse
blackboy167thst is not online. blackboy167thst
Joined: 22 Jul 2011
Total Posts: 2468
08 Oct 2012 12:09 PM
Err. Is the only TextBox and I'm not trying to change the text. I'm looking for the text. Like:

print(TextBox.Text)

It won't print the text I changed it to, it will print the text it normally had.
Report Abuse
thecaptain97 is not online. thecaptain97
Joined: 17 Jun 2010
Total Posts: 4987
08 Oct 2012 12:10 PM
Can You show the rest of the Script please? It may Identify the Problem.
Report Abuse
blackboy167thst is not online. blackboy167thst
Joined: 22 Jul 2011
Total Posts: 2468
08 Oct 2012 12:11 PM
It's in a local script:


local text = script.Parent.Parent.TextBox.Text
script.Parent.MouseButton1Down:connect(function()
local player = game.Players:findFirstChild(text)
if player and player ~= script.Parent.Parent.Parent.Parent.Parent.Name then
for _,v in pairs(script.Parent.Parent.Parent.Parent.Parent.Character:GetChildren()) do
if v:IsA("BasePart") then
v.Anchored = true
end
end
Workspace.CurrentCamera = player.Character.Humanoid
script.Parent.Parent.Parent.DoneSpectating:TweenPosition(UDim2.new(0, 0, 0.45, 0))
end
end)
Report Abuse
thecaptain97 is not online. thecaptain97
Joined: 17 Jun 2010
Total Posts: 4987
08 Oct 2012 12:15 PM
local text = script.Parent.Parent.TextBox.Text

There lys the Problem

"text" will stay the ORIGINAL Text


Do this instead:

local text = script.Parent.Parent.TextBox

local player = game.Players:findFirstChild(text.Text)
Report Abuse
blackboy167thst is not online. blackboy167thst
Joined: 22 Jul 2011
Total Posts: 2468
08 Oct 2012 12:16 PM
Thanks.
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