How Can i Change Position of TextBox

How Can i Change Position of these textboxs Idk anything about Positions
Here:

local bar = plugin:CreateToolbar("Test");


local button1 = bar:CreateButton( -- Create a button
	"Testing Brrr", -- Title
	"Just Tesssssttt", -- Description
	"rbxassetid://12675160072"
);

local info = DockWidgetPluginGuiInfo.new( -- Create your widget info
	Enum.InitialDockState.Float,  -- Dock State
	true,   -- toggle enabled 
	true,    -- sets wheater it overrides the previous window or not 
	200,     -- width 
	44, 	 -- height    
	200,     -- min width
	44       -- min height
)

local widget1 = plugin:CreateDockWidgetPluginGui("JustTest", info) -- create your widget.

local textBox = Instance.new("TextBox");
textBox.Text = "Name";
textBox.Size = UDim2.new(0.25, -1, 1, 0.8);
textBox.Visible = true;
textBox.BackgroundTransparency = 0
textBox.Parent = widget1;

local textBox2 = Instance.new("TextBox");
textBox2.Text = "Value"
textBox.Size = UDim2.new(0.25, -1, 1, 0.8);
textBox.Visible = true;
textBox.BackgroundTransparency = 0
textBox.Parent = widget1;

local textBox3 = Instance.new("TextBox");
textBox3.Text = "Power";
textBox.Size = UDim2.new(0.25, -1, 1, 0.8);
textBox.Visible = true;
textBox.BackgroundTransparency = 0
textBox.Parent = widget1;

local textBox4 = Instance.new("TextBox");
textBox.Text = "CoolDown";
textBox.Size = UDim2.new(0.25, -1, 1, 0.8);
textBox.Visible = true;
textBox.BackgroundTransparency = 0
textBox.Parent = widget1;

local name 
local value
local cooldown

function PluginCode()
	widget1.Enabled = true;
end



--// Connect \\--
button1.Click:Connect(PluginCode);

local selection = game:GetService("Selection")



function MainFunc()
	local selected = selection:Get();
	for i, v in ipairs(selected) do
		if v.Name == "Handle" then
			local maketool = Instance.new("Tool")
			maketool.Parent = game.ServerStorage.Folder
			v.Parent = maketool
			maketool.Name = name
			
				
			
		else
			warn("Select a Handle!")
		end
	end
end

textBox.FocusLost:Connect(function(enterpressed)
	if enterpressed then
		name = textBox.Text
		MainFunc()
		
	end
end)

TextBox.Position? If you’re working on plugins, I would assume that same person know’s how UDim2 works?

2 Likes

To change the position of the textboxes, you need to modify their Position property. The Position property is a UDim2 value that represents the position of the object relative to its parent.

You can adjust the Position property of each textbox by modifying the X and Y components of the UDim2 value. For example, if you want to move textBox2 to the right by 50 pixels, you can set its Position property like this:

textBox2.Position = UDim2.new(0.25, 50, 0, 0)

if this works, please label it as solution!

Changed Position but Wrong and others are not visible

I suggest making your gui in StarterGui, and then later move it out and put it in the plugin. The explorer would look like this:

StarterGui:
	PluginGui: (ScreenGui)
		PluginContainer: (Frame) -- Pretending to be the Widget
			Container: (Frame) -- This is what you're moving out and using
				TextLabel: (TextLabel)

i will try 30. character limit

It should definitely make this easier for you, so you don’t need to make a textbox with a script.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.