Well I think this clip speaks for itself.
The first one is on pc other one on ios Iphone XR
So for some reason there is some weird offset on the IPhone XR version. This messes up some ui elements in my game. Have anyone found a fix for this problem, it’s very weird to me that this occurs in the first place. Please help if you know anything.
The code is:
local UIS = game:GetService("UserInputService")
local mouse = game.Players.LocalPlayer:GetMouse()
mouse.Button1Down:Connect(function()
local mouseLocation = UIS:GetMouseLocation()
local frame = Instance.new("Frame")
frame.BackgroundColor3 = Color3.new(1, 0, 0)
frame.AnchorPoint = Vector2.new(.5, .5)
frame.Size = UDim2.fromOffset(50,50)
frame.Position = UDim2.fromOffset(mouseLocation.X, mouseLocation.Y)
frame.Parent = game.Players.LocalPlayer.PlayerGui.Popups
game:GetService("Debris"):AddItem(frame, 4)
end)