How do I solve this?

So I have a nametag system.
Part of it is the user device detecting.

local Players = game:GetService("Players")
local Player = Players.LocalPlayer
local inputService = game:GetService("UserInputService")
local replicated = game:GetService("ReplicatedStorage")
local remotes = replicated:WaitForChild("Remotes")

-- Check platform
task.wait(4)


if inputService.TouchEnabled and not inputService.KeyboardEnabled then
    --mobile
    remotes:WaitForChild("NameTagRemote"):FireServer("platform","mobile")
elseif inputService.GamepadEnabled and not inputService.KeyboardEnabled then
    --console
    remotes:WaitForChild("NameTagRemote"):FireServer("platform","console")    
elseif not inputService.TouchEnabled and not inputService.GamepadEnabled then
    -- Load PC
    remotes:WaitForChild("NameTagRemote"):FireServer("platform","pc")
end

    --Afk
inputService.WindowFocusReleased:Connect(function()
    remotes:WaitForChild("NameTagRemote"):FireServer("afk",true)
end)
inputService.WindowFocused:Connect(function()
    remotes:WaitForChild("NameTagRemote"):FireServer("afk",false)
end)

image

How I load that:

--//Services
local OverheadService = require(script.OverheadService)
local Players = game:GetService("Players")


Players.PlayerAdded:Connect(function(Player)
	Player.CharacterAppearanceLoaded:Connect(function(Character)
		OverheadService:CreateTag(Player)
	end)
end)

The issue is the following:
When pc users reset, it works.
But when mobile users reset, it won’t show their mobile icon above their head.

I think the problem is in the script module and something else, I recommend you just check if the Touch, gamepad and Keyboard are active, that is:

if inputService.TouchEnabled  then
    --mobile
    remotes:WaitForChild("NameTagRemote"):FireServer("platform","mobile")
elseif inputService.GamepadEnabled then
    --console
    remotes:WaitForChild("NameTagRemote"):FireServer("platform","console")    
elseif inputService.KeyboardEnabled then
    -- Load PC
    remotes:WaitForChild("NameTagRemote"):FireServer("platform","pc")
end