Update script.lua
This commit is contained in:
16
script.lua
16
script.lua
@@ -1,10 +1,8 @@
|
||||
function Init()
|
||||
local screen = GetPartFromPort(1, "Screen")
|
||||
screen:ClearElements()
|
||||
screen:CreateElement("TextLabel", {
|
||||
Text = "Hello World",
|
||||
TextScaled = true,
|
||||
Size = UDim2.fromScale(1, 1),
|
||||
Position = UDim2.fromScale(0, 0)
|
||||
local screen = GetPartFromPort(1, "Screen") --Gets the screen
|
||||
screen:ClearElements() --clears the screen of any previous elements
|
||||
screen:CreateElement("TextLabel", { -- creates an element with the given name and properties
|
||||
Text = "Hi!", --Sets the text to Hi!
|
||||
TextScaled = true, -- Automatically scales the text to fit the screen
|
||||
Size = UDim2.fromScale(1, 1), --Makes the size cover the whole screen
|
||||
Position = UDim2.fromScale(0, 0) --sets the position
|
||||
})
|
||||
end
|
||||
Reference in New Issue
Block a user