Here's the script, in a localscript in StarterGui
local player = game.Players.LocalPlayer --Variable for the player
local Pc = game.ReplicatedStorage.MainGui.Pc --Variable for the gui
local Xbox = game.ReplicatedStorage.MainGui.Xbox
if game:GetService("UserInputService").GamepadEnabled then
Xbox:Clone().Parent = player.PlayerGui
Xbox.Visible = true
if game:GetService("UserInputService").KeyboardEnabled then
Pc:Clone().Parent = player.PlayerGui
Pc.Visible = true
end
end
end
end
Please let me know what I've done incorrectly. Thank you.

1 comment
Could you possibly edit my code to what it should be please?