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

Text Button won't work?

Asked by
Zexisk 0
10 years ago

Different problem, it doesn't show up on my screen when I join the game -- The Text Button doesn't show?

-- Create ScreenGui
local screenGui = Instance.new("ScreenGui")
screenGui.Parent = script.parent

-- Create text button
local textButton = Instance.new("TextButton")
textButton.Parent = screenGui
textButton.Position = UDim2.new(0, 25, 0, 50)
textButton.Size = UDim2.new(0, 150, 0, 50)
textButton.BackgroundColor3 = BrickColor.White().Color
textButton.Text = "Shop"

-- Bind function to button click
textButton.MouseButton1Down:connect(function()
    textButton.Text = "This shop is still being made, check back later!"
end)

-- Script made by Zexisk [ Beginner Scripter ]

1 answer

Log in to vote
1
Answered by 10 years ago

You almost had it. Change script.parent to script.Parent on line 3

0
I accidently inserted a Text Box instead, but thanks for answering +1 for you! Zexisk 0 — 10y
Ad

Answer this question