How can i make sure that the canvas position of pc and the mobile one are the same?

do you know how could i use it?

Hmmm i dont see it. when I get on my computer I can give you the name of the plugin or give you the link but i think it was Autoscaler something.

1 Like

relevant plugin I made a couple years ago to scale stuff if thatā€™s what you want
scales your GUI components so they look and are positioned the same on different viewports

2 Likes

so the plusing canā€™t help meā€¦ Other solutions?.. I really need help

This might be a pain to do but scale it manually. Change position and size to scale. Also, make the AnchorPoint 0.5, 0.5

1 Like

what do you mean by scale manually? Because the problem is that every device have a different CanvasPositionā€¦ I cannot do that if a player is on mobile then the canvas position is dfferent bc it depends the screen size. Btw i know a way to calculate the screen size, maybe it could helpā€¦

P.S. i changed the anchor point, but what change? Ty for the answer btw xD

You need to size it in scale so it is, for example, half the size of the screen. You should also try messing with UIScaleConstraints.

1 Like


now i did this scipt and it should work but the problem is that i have UIlistLayout and all the frames have got the same positionā€¦ I will try your solutions too. Ty again for the answer

Is the guiā€™s anchor point set to 0.5,0.5?

1 Like

Ty for the answer. All anchor points of guis is 0.5,0.5

The solution that i found basically is to check the screen of the player and put different canvaspositions. Not automatics, but with some maths i resolved it (to calcultae the different canvasposition beetween phone and pc), so now it is my script

local player = game.Players.LocalPlayer

local mouse = player:GetMouse()
x = mouse.ViewSizeX
y = mouse.ViewSizeY

game.ReplicatedStorage.Countries.Italy.OnClientEvent:Connect(function()
	script.Parent.Parent.Parent.Visible = true
	
	if x >= 860 and x <= 1750 then  --- if is a tablet or a pc then
		
	local tweenservice = game:GetService("TweenService")
	local twinfo = TweenInfo.new( 
	 2,
	 Enum.EasingStyle.Linear,
	 Enum.EasingDirection.InOut,
	 0,
	 false,
	 0
	)


local Status = game.ReplicatedStorage.Status
local tween = tweenservice:Create(script.Parent.Parent, twinfo, {CanvasPosition = Vector2.new(200, 0)})

I add more elseif

Edit: nevermind, it doesnā€™t work for all

This was the plugin i was talking about lol

1 Like