-- position top right = {0.018, 0},{0.029, 0} -- Size = {0, 200},{0, 50} function onTouched() local screenGui = Instance.new("ScreenGui") screenGui.Parent = game.StarterGui local textBox = Instance.new("TextBox") textBox.Parent = screenGui textBox.Position = UDim2.new {0.018, 0},{0.029, 0} textBox.Size = UDim2.new {0, 200},{0, 50} textBox.BackgroundColor3 = BrickColor.White().Color textBox.BackgroundTransparency = 1 textBox.Text = "Coin: 1" end script.Parent.Touched:connect (onTouched)
note this is in a part named "Coin!"

4 comments
Note this is a local script
I'm confused on what you're trying to do and can you put your code in a code block?
"part"
"part" - "screengui". will that even work? try using surfacegui instead. why don't you just pre-make the gui instead of creating a new instance