SurfaceGui not showing?

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)

Set the surfacegui’s face to the one you want it to show on the block. (What I could think of)

1 Like

I realized I forgot to parent the surfacegui to playergui

1 Like