I am trying to get the text box to appear when you click the key.
local key = script.Parent
local click = key.ClickDetector
local StarterGui = game:GetService('StarterGui')
local scrgui1 = Instance.new("ScreenGui",StarterGui)
local function onClick(clicked)
key.Transparency = 1
key.Value.Value = true
local alert = Instance.new("TextLabel",scrgui1)
alert.Text = "You picked up the old key."
alert.Position = UDim2.new(0.5,0,0.5,0)
wait(2)
alert:Destroy()
end
click.MouseClick:connect(onClick)
