Local script
local surfacegui = game.ReplicatedStorage.sgui
while true do
wait(2)
local Face
Face = math.random(0,5)
surfacegui:FireServer(Face,workspace.guitest)
end
Server script
sguievent.OnServerEvent:Connect(function(Player,face,adornee)
local SG = Instance.new("SurfaceGui",Player)
local frame = Instance.new("Frame",SG)
SG.Adornee = adornee
SG.AlwaysOnTop = true
SG.LightInfluence = 1
SG.ZIndexBehavior = Enum.ZIndexBehavior.Sibling
frame.Size = UDim2.new(1,0,1,0)
frame.BackgroundColor3 = Color3.new(255,255,255)
print("SG made", "SG Parent:"..parent.Name)
end)