In this function, the two new instances (ScreenGui and Frame) are both created as they should be and when I test it in game the size is set for the Frame (as again it should be), however I cannot see the frame.
function stuff(part) if not game.StarterGui:FindFirstChild("ScreenGui") then local sc = Instance.new("ScreenGui", game.StarterGui) wait (0.1) local fr = Instance.new("Frame", game.StarterGui.ScreenGui) game.StarterGui.ScreenGui.Frame.Size = UDim2.new{0, 100},{0, 100} end end script.Parent.ClickDetector.MouseClick:connect(stuff)
local playerGui = game.Players.LocalPlayer.PlayerGui function stuff(part) if not game.StarterGui:FindFirstChild("ScreenGui") then local sc = Instance.new("ScreenGui", playerGui) wait (0.1) local fr = Instance.new("Frame", sc) fr.Size = UDim2.new(0, 100, 0, 100) end end script.Parent.ClickDetector.MouseClick:connect(stuff)
Try this.