I am making a text button for a game but the text button wont even show up
gameStartGui = Instance.new("ScreenGui") gameStartGui.Parent = game.StarterGui gameStartGui.Name = "oneLoadScreen" lightFire = Instance.new("TextButton") lightFire.Name = "Light Fire" lightFire.Text = "Light Fire" lightFire.FontSize = "Size36" lightFire.Font = "Arial" lightFire.Parent = game.StarterGui.oneLoadScreen lightFire.Position = {0.95, 0},{0.38, 0}
Make Light Fire's variable lf, easier to type. Also, try this
X = Instance.new("X", game.X.X)
You need to create this gui in every player's PlayerGui
. To do this I loop through all the players using a for loop.
I also noiticed you were not using an UDim2
value for the Position.
Method 1: Using a for loop and manipulating every Gui.
for _,n in pairs(Game.Players:GetPlayers()) do gameStartGui = Instance.new("ScreenGui",n.PlayerGui) gameStartGui.Name = "oneLoadScreen" lightFire = Instance.new("TextButton",gameStartGui) lightFire.Name = "Light Fire" lightFire.Text = "Light Fire" lightFire.FontSize = "Size36" lightFire.Font = "Arial" lightFire.Position = UDim2.new(0.95, 0,0.38, 0) end
Method 2: Cloning
gameStartGui = Instance.new("ScreenGui") gameStartGui.Name = "oneLoadScreen" lightFire = Instance.new("TextButton",gameStartGui) lightFire.Name = "Light Fire" lightFire.Text = "Light Fire" lightFire.FontSize = "Size36" lightFire.Font = "Arial" lightFire.Position = UDim2.new(0.95, 0,0.38, 0) for _,n in pairs(Game.Players:GetPlayers()) do gameStartGui:Clone().Parent = n.PlayerGui end