I am trying to make a text button when pressed print "working" to the console, but the button when pressed does nothing (in studio) and in a game the GUI does not even appear...
The script has been tried in StarterPack and StarterGui..
Making Gui:
--ScreenGui
local Screen = Instance.new("ScreenGui")
Screen.Parent = game.StarterGui
--Frame
local Frame = Instance.new("Frame")
Frame.Parent = Screen
Frame.Size = UDim2.new(1,0,1,0)
Frame.BackgroundTransparency = 0.5
--Back
local Back = Instance.new("TextButton")
Back.Parent = Frame
Back.Name = "back"
Back.Text = "Back"
Back.Position = UDim2.new(0,0,0.1,0)
Back.Size = UDim2.new(0,50,0,50)
Functions (same script):
function onClick()
print ("working")
end
Back.MouseButton1Click:connect(onClick)
