The script in serverscriptservice:
local Frame = Instance.new("Frame") local ScreenGui = Instance.new("ScreenGui") local StarterGui = game.StarterGui ScreenGui.Parent = StarterGui Frame.Parent = ScreenGui Frame.Position "{0, 0},{0, 0}" Frame.Size "{0, 100},{0, 100}" if Frame.Visible == false then Frame.Visible = true end
local Frame = Instance.new("Frame") local ScreenGui = Instance.new("ScreenGui") local PlayerGui = game.Players.LocalPlayer.PlayerGui ScreenGui.Parent = PlayerGui Frame.Parent = ScreenGui Frame.Position = UDim2.new(0, 0,0, 0) Frame.Size = UDim2.new(0, 100,0, 100) if Frame.Visible == false then Frame.Visible = true end
The correct way on setting gui position is by using Udim2.new
:
local Frame = Instance.new("Frame") local ScreenGui = Instance.new("ScreenGui") local StarterGui = game.StarterGui ScreenGui.Parent = StarterGui Frame.Parent = ScreenGui Frame.Position Udim2.new(0, 0,0, 0) Frame.Size Udim2.new(0, 100,0, 100) if Frame.Visible == false then Frame.Visible = true end
Easy
local ScreenGui = Instance.new("ScreenGui",game.Players.LocalPlayer.PlayerGui) local Frame = Instance.new("Frame",ScreenGui) Frame.Position Udim2.new(0, 0,0, 0) Frame.Size Udim2.new(0, 100,0, 100) if Frame.Visible == false then Frame.Visible = true end