#UserInputservice and UI

7 messages · Page 1 of 1 (latest)

odd sapphire
#
function onEquip()
    if debounce == false then debounce = true
    print("debounceequip")
    local player = game.Players:GetPlayerFromCharacter(Tool.Parent)
    local uis = game:GetService("UserInputService")
    local mobile = uis.TouchEnabled
    local xbox = uis.GamepadEnabled

    local gui = script.Parent.Activation
    local clonegui = gui:Clone()
    clonegui.Parent = player.PlayerGui

        if mobile == true then
            clonegui.DifDevices.Visible = true
            clonegui.DifDevices.TouchScreen.Visible = true
        elseif xbox == true then
            clonegui.DifDevices.Visible = true
            clonegui.DifDevices.Console.Visible = true
        else
            clonegui.DifDevices.Visible = false
            clonegui.PC.Visible = true
        end
    end
end

fo some reason it works in studio but not for real mobile people

willow wraith
#

try using waitforchild on EVERYthing

#

client is very picky without waitforchild

odd sapphire
willow wraith
#

...

#

no

#

they arent instances