Hello,
So as you can see in the title I can’t acces the PlayerGui with an server-script I know its possible and I know I did that sometime but that was a very, very long time ago.
So it would be really helpfull if someone told me how I can acces the PlayerGui again.
Here’s the script in case you need it;
wait(5)
local Players = game:GetService("Players")
local player = Players.LocalPlayer
local PlayerGui = player:WaitForChild("PlayerGui")
local names = {"Monica", "Joey", "Sarah", "Phoebe", "Michel", "Michael", "James", "Adam"}
local companyNAMES = {"ElectroShop", "Cablebar" ,"Airedable" ,"Tv.Inc", "Videosify", "Tellyware", "Onaired", "Remixus", "Technomax", "Elevatelly", "Envideos", "Inc.ia", "Cotv", "Coremix", "Edaired", "Unitelly" }
local ReplicatedStorage = game.ReplicatedStorage.RemoteFunctions.AbortFunctions.Order1.Order1Function
local tvOrdersRMD = {"OldTv", "Salora 58UA330"}
local randomtask = names[math.random(#companyNAMES)] -- The 1st parameter defaults to 1 if it's not specified, so in this case we can just put #companyNAMES to find the max number in the table.
local randomtask2 = math.random(#names)
local guiPlaces = game.StarterGui.ComputerMenu.Orders.Background1.OrderPlaces
if guiPlaces.Value == 0 then
wait(5)
local index
index = math.random(1, #names)
local i
i = math.random(1, #tvOrdersRMD)
local ORDER = Instance.new("TextButton")
ORDER.Parent = PlayerGui.ComputerMenu.Orders.Background1
ORDER.Size = UDim2.new(0.25, 0, 0.278, 0)
ORDER.Position = UDim2.new(0.122, 0, 0.146, 0)
ORDER.Name = "Order1"
ORDER.BackgroundColor3 = Color3.fromHSV(0.54425, 0.886275, 1)
ORDER.Text = "Name: ".. names[index]
ORDER.TextSize = 20
ORDER.LineHeight = 5
local CircleGui = Instance.new("UICorner")
CircleGui.Parent = ORDER
local TvRMD = Instance.new("TextLabel")
TvRMD.Name = "TVSelecter"
TvRMD.Parent = ORDER
TvRMD.Size = UDim2.new(1, 0, 0.301, 0)
TvRMD.Position = UDim2.new(0, 0, 0.457, 0)
TvRMD.BackgroundTransparency = 1
TvRMD.TextSize = 18
TvRMD.Text = "Order: ".. tvOrdersRMD[i]
local ABORT = game.StarterGui.ComputerMenu.Orders.Background1.Abort:Clone()
ABORT.Name = "AbortClone"
ABORT.Parent = ORDER
ABORT.Size = UDim2.new(0.25, 0, 0.278, 0)
ABORT.Position = UDim2.new(0.85, 0, -0.1, 0)
guiPlaces.Value = guiPlaces.Value + 1
script.Disabled = true
wait(5)
script.Disabled = false
end