local textb = game.StarterGui.ScreenGui.TextButton
textb.MouseButton1Click:connect(function(e) if game.Players.LocalPlayer.Backpack.Item then
print("Working.")
end
end)
StarterGUI
ScreenGUI
TextButton
Script
That how it goes
Change
local textb = game.StarterGui.ScreenGui.TextButton
to
local textb = script.Parent
also, to make sure that your script doesn't return error, change
if game.Players.LocalPlayer.Backpack.Item then
to
if game.Players.LocalPlayer.Backpack:FindFirstChild("Item") then
also make sure that you are using LocalScript