while true do
--point Create
local Point = Instance.new("TextButton")
Point.Parent = game.StarterGui.ScreenGui
Point.Visible = true
Point.Size = UDim2.new(0, 50, 0, 50)
--color
Point.BackgroundColor3 = Color3.new(255/255, 255/255, 255/255)
--Location
local xPos = math.random(23,1840)
local yPos = math.random(180, 950)
Point.AnchorPoint = Vector2.new(xPos, yPos)
Point.Position = UDim2.new(0, xPos, 0, yPos)
print("x : ",xPos," y : ",yPos)
--delete
wait(5)
Point.MouseButton1Click:Connect(function()
Point:Remove()
end)
end
This is my script there is no error or error code. So what's the problem you might ask. Well the TextButton is generated in the ScreenGui but it is not showing up. I tried to set the code to white as you can see but it won't show up. This is the URL to the picture of the TextBox how it is looking.
So like you saw the box is still there and will appear when you click it. But it won't show up. Please help me...

2 comments
Make sure visible is set to true.
And make sure on line 4 that startergui is playergui. That's because if you put it startergui it doesn't actually update until you reset or game starts