So, I am currently trying to create a frame using a ModuleScript, and it creates it like it should, but the UDim2 values are ignored and stay UDim2.new({0, 0},{0, 0}) no matter what I do. This is the script I have currently:
local Dialogue = {}
function Dialogue.Create()
if not game.Players.LocalPlayer.PlayerGui.Game.Graphics.Dialogue:FindFirstChild('Holder') then
local holder = Instance.new('ImageLabel', game.Players.LocalPlayer.PlayerGui.Game.Graphics.Dialogue)
holder.Name = "Holder"
holder.Image = "rbxassetid://2589083797"
holder.Position = UDim2.new({0, 0},{0.671, 0})
holder.Size = UDim2.new({1, 0},{0.329, 0})
holder.BackgroundTransparency = 1
local text_holder = Instance.new('TextLabel', holder)
text_holder.Name = "Dialogue"
text_holder.Size = UDim2.new({0.755, 0},{0.561, 0})
text_holder.Position = UDim2.new({0.123, 0},{0.093, 0})
text_holder.BackgroundTransparency = 1
text_holder.TextColor3 = Color3.new(255, 255, 255)
text_holder.Font = "Arial"
text_holder.TextSize = 25
text_holder.TextWrapped = true
text_holder.TextXAlignment = "Left"
text_holder.TextYAlignment = "Top"
end
end
return Dialogue
Should I just have a pre-made blank version of the GUI part I am trying to make in ReplicatedStorage and just clone or, or is there a way to fix this script?

3 comments
I believe you can make a pre-made blank version of the GUI and implant it in the script, then create a clone of it from the GUI in the script into the PlayerGui I guess
That is what I am thinking I will have to do, because seems like no matter what I do, the GUI will not change to the size or positions I set in the script -_-
So, I was trying to manually change the size from the property window, and it always reverts to 0 on everything... maybe my studio is just broken. Can't change the size or positon of them at all.