I’m trying to create something so that when you insert your planet name into the text box and once you click confirm it changes the text on the part TextLabel to the name (Text of the TextBox).
You could send the “Text” in the TextBox thru a remote to server, make server to validate the name using filters from chat service I think, then find the part, find the billboard, find the TextLabel and place the string in the Text property of the TextLabel
Simple,
local textlabel = workspace.Planet.BillBoardGui.TextLabel
local textbox = script.Parent
local confirm = script.Parent.Button
confirm.MouseButton1Click:Connect(function()
textlabel.Text = textbox.Text
end)
I keep getting this error
Players.Reidy00021.PlayerGui.NamePlanet1.NamePlanet1.TextBox.LocalScript:6: attempt to index string with ‘Text’
did you do something like this?
local textlabel = workspace.Planet.BillBoardGui.TextLabel.Text -- textlabel would be a string which is not what you want here
I’m still getting the error I sent before.
well what exactly did you do
what i sent is what you Don’t want
Here is my code
local textlabel = workspace.Planet1.BillboardGui.Name
local textbox = script.Parent
local confirm = script.Parent.Parent.Confirm.Planet
confirm.MouseButton1Click:Connect(function()
textlabel.Text = textbox.Text
end)
local textlabel = workspace.Planet1.BillboardGui.Name
BillboardGui.Name is still a string are you trying to get the textlabel?
Yes I am trying to get into the text label
@coo1ifyy already gave you a script here @Reidy00021
doing BillboardGui.Name is getting the billboard’s name instead of the textlabel
So I have to rename the Textlabel?
you should do
local textlabel = workspace.Planet.BillBoardGui.NameOfYourTextlabel
--replace "NameOfYourTextlabel" with the name of the textlabel that's inside BillboardGui
--you can rename it if you want
also the solution should really go to @coo1ifyy
Aditionally, as I stated in the first reply, if you pretend other players can see the name of the planet too and not only the client, filtering will be needed when using TextBox:
This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.