Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
-3

whats wrong with my script? [closed]

Asked by 8 years ago

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

0
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. scottmike0 40 — 8y

Closed as Not Constructive by ScriptGuider, Azmidium, DevSean, and Uroxus

This question has been closed because it is not constructive to others or the asker. Most commonly, questions that are requests with no attempt from the asker to solve their problem will fall into this category.

Why was this question closed?

1 answer

Log in to vote
0
Answered by 8 years ago
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

Ad