My custom mouse goes to the behind of the GUI

I’m making a custom Mouse system that uses

local inputServ = game:GetService("UserInputService")
local rs = game:GetService("RunService")
local players = game:GetService("Players")
local player = players.LocalPlayer --player
local mouse = player:GetMouse() -- mouse

local MouseFunctions = {}

local CurrentElement = player.PlayerGui.CustomIcon.IconSkeleton

mouse.Move:Connect(function()
	inputServ.MouseIconEnabled = false
	CurrentElement.Position = UDim2.new(0, mouse.X, 0, mouse.Y)
end)

this exact line for creating me a custom mouse icon.

It’s ZINDEX is 999999 and it appears to be show above of the other gui’s, but its getting behind of my phone gui.


Here is the phone GUI.
image
It’s ZIndex.

Helps are appriciated.

2 Likes

Try a zindex of -1? It might help or it might do nothing

2 Likes

That was a dumb question. I just forget the DisplayOrder exists in ScreenGUI’s.

1 Like

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