Gui is not moving to the right position

local function onTemplatePress(temp)
	selectedTemplate = temp
	
	if selectedTemplate:FindFirstChild("Equipped").Value == true then
		equipBTN.Text = "Unequip"
		selectedTemplate.EquippedTXT.Visible = true
		
	else
		selectedTemplate.EquippedTXT.Visible = false
		
		equipBTN.Text = "Equip"
	end
	petNameDisplay.Text = temp.Name
	
	info.Visible = true
	info.Position = UDim2.new(selectedTemplate.Position.X ,0,selectedTemplate.Position.Y,0)
	
	info.CoinMultiplier.Text = "x"..replicatedStorage.Pets:FindFirstChild(temp.Name, true).Config.CoinMultiplier.Value
	
end

https://gyazo.com/431a3d0960b2cd8d10597880424c7d0b

heres whats happening

This could be because your GUI isn’t scaled properly. Use scale instead of offset, use constraints and maybe anchor point as well. Then let me know if the issue is gone. You can do all this using an autoscale plugin.

i am using scale, when adding an anchor point the gui just shoots up towards the middle and sits there.

Are you using an invisible contents frame that has all the GUI elements inside it? It really helps when it comes to positioning frames correctly.

what is an invisible contents frame? could you elaborate

So you have a frame named β€˜Contents’ with it’s transparency set to 1. You set it’s size to 1 on the X axis and the Y axis big enough to cover all of the frames.

sorry for the late response i had to do something, but yes i am using that

Try to use plugins for scaling GUIs (But be careful, you might encounter a virus so avoid anything suspicious)

i found a solution forget to mark it as solved

1 Like

What was the solution?​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​

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