RemoteEvent.OnServerEvent:Connect(function(player, device)
if device == "Console" then
GuiClone.Frame.IconHolder.Console.Visible = true
elseif device == "Computer" then
GuiClone.Frame.IconHolder.Computer.Visible = true
elseif device == "Mobile" then
GuiClone.Frame.IconHolder.Mobile.Visible = true
end
end)
Local Script
local UserInputService = game:GetService("UserInputService")
local deviceCheck = game.ReplicatedStorage:FindFirstChild("deviceCheck")
if UserInputService.GamepadEnabled and not UserInputService.KeyboardEnabled and not UserInputService.MouseEnabled then
deviceCheck:FireServer("Console")
elseif UserInputService.KeyboardEnabled and UserInputService.MouseEnabled then
deviceCheck:FireServer("Computer")
elseif UserInputService.TouchEnabled then
deviceCheck:FireServer("Mobile")
end
For the LocalScript, try to remove all the and not conditions for the console. I’m not sure if it will work or not, since I didn’t want to test and see if it will work or not. If it didn’t work, reply to me, okay?
Looking at your code, youre missing a parameter that you added for the event, which is player. Maybe try to inlcude the LocalPlayer when attempting to fire server.
I also suggest using print("Code Passed Up To Here") in some places where functions run to make sure it fired and ran properly, then you would know it would most likely be another problem.
Well, first you gotta figure out why you added that as a parameter in the first place.
I was guessing you added that there so it can find the player UIInput Type, and to find the character of the player. You can find how to get the local player in the Developer Hub.
Btw, when you were debugging with print, was everything working properly?
And, when you run the game, does it randomly pick from the ui images, or specifically 1 every time on one device?