Textlabel size, position and TextStrokeColor3 not showing up

I am trying to create a TextLabel, put it in a frame that is in StarterGui and have it show up on screen with the positions, sizes and text I assign to it. (Btw this script is in a ScreenGui in StarterGui)
local sP = script.Parent
endPrompt = Instance.new(“TextLabel”, sP.GameScoreFrame)
endPrompt.Text = “The round has ended”
endPrompt.TextColor3 = Color3.new(13, 105, 172)
endPrompt.Position = UDim2.new(0.070, 0, 1.8, 0)
endPrompt.TextSize = 45
endPrompt.BackgroundTransparency = 1
endPrompt.TextStrokeColor3 = Color3.new(0, 0, 0)
endPrompt.Font = ‘SourceSansBold’
endPrompt.Visible = true
The result I get from this is the textlabel on the screen, but the position and text color are not changed and I can not find the textlabel in GameScoreFrame. This is my first post on dev forum so feedback is greatly appreciated!! image|690x388

There a few things that could be causing it. But to address something, the reason it’s not showing for you that it is in GameScoreFrame is because it is inside the Player’s PlayerGui, not StarterGui.

The first thign it could be is that setting the 2nd parameter of Instance.new is bad and can be slow, especially when you have to set up a lot of properties. Although I don’t believe it has anything to do with it. I’m guessing you’re trying to make a win textlabel.

What I would do instead is make the TextLabel without a script and make it invisible, and then when a condition is met, such as a team winning, make the textlabel visible and change the text to suit the condition. Say you set the default text to “Blue team has won the game!” If red won, make the textlabel visible and set the text to “Red team has won the game!”. I’m not sure why it is needed to make it via a script

Ok thankyou I will make revision and try doing that later today! :grin:

Anytime! I think the method I suggested would work better since you’re making a Win text I presume?

I think so. There will be three different prompts so I think it will work.

If those 3 prompts are gonna be using the same Textlabel, then there’s really no need to ahve to use a script to make the textlabel when it can be made already but hidden till a condition is met, and if a condition is met, make it visible and set the text of it to something relating to that condition. It would be more consistent as well since I tried to find a fix for your issue and I couldn’t even get the gui to appear for me