local iosActive = false
local iphone = false
if userInputService.TouchEnabled and not userInputService.KeyboardEnabled then
	iosActive = true
	local gui = Instance.new("ScreenGui")
	gui.Parent = script.Parent
	local originalMainGui = script.Parent:FindFirstChild("MainGui")
	if originalMainGui then
		originalMainGui:Destroy()
	end
	local mainGui
	if gui.AbsoluteSize.X >= 1000 and gui.AbsoluteSize.Y >= 700 then
		mainGui = game:GetService("ReplicatedStorage"):WaitForChild("Tablet"):Clone()
		mainGui.Name = "MainGui"
		mainGui.Enabled = true
		mainGui.Parent = script.Parent
	else
		local mainGui = game:GetService("ReplicatedStorage"):WaitForChild("Phone"):Clone()
		mainGui.Name = "MainGui"
		mainGui.Enabled = true
		mainGui.Parent = script.Parent
		iphone = true
	end
	gui:Destroy()
else
	script.Parent:WaitForChild("MainGui").Enabled = true
end

3 comments

0

¿?

0

Explain more lol, where is the error, why do you have the upside down questionmark and a normal questionmark??

0

He tells me that the error is on line 12 in if gui.AbsoluteSize.X >= 1000 and gui.AbsoluteSize.Y >= 700 then