text = game.StarterGui.ScreenGui.Frame.TextBox.Text
Spawn.MouseButton1Down:connect(function(spawn)
local ID = "item"..game.ScreenGui.ScreenGui.Frame.TextBox.Text
print(ID)
end)
.. It doesnt work.. It doesnt print anything
text = game.StarterGui.ScreenGui.Frame.TextBox.Text
Spawn.MouseButton1Down:connect(function(spawn)
local ID = "item"..game.ScreenGui.ScreenGui.Frame.TextBox.Text
print(ID)
end)
.. It doesnt work.. It doesnt print anything
text = game.Players.LocalPlayer.PlayerGui.Frame.TextBox.Text
Spawn = ???? --you need to define spawn
Spawn.MouseButton1Down:connect(function(spawn)
local ID = "item"..text
print(ID)
end)
You forgot to define spawn and also the text would be in the PlayerGUi
This discussion is preserved as it was. New answers, comments, and votes are closed.
1 comment
because you are printing an object. and because you have a wrong access point to the value. A side note, there is something called game.players.LocalPlayers; its very handy for stuff like this.