Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

Can someone help me with detecting gamepad enabled?

I have this script:

if game:GetService("UserInputService").GamepadEnabled then
	print("gamepad enabled")
	local instructions = player:WaitForChild("PlayerGui").Instructions.text
	print("found instructions")
	instructions.Visible = true
	wait(30)
	instructions.Visible = false
end

Everything before the script works perfectly fine. I have the exact same if game:GetService("UserInputService").GamepadEnabled then in another script in my game thats works fine. It is in a server script in the ServerScriptService. The script itself has to do with gamepass's.

Thank you in advance for any help.

1 answer

✓ Accepted answer

It should be in a local script and be placed in StarterGui, StarterPack or CharacterScripts. There is no need for it to be in a server script but if you want you can use a remoteevent to communicate to the server script.

2 comments

0

The issue was that the script has to do with gamepass', which autocorrected to gamepads, so that's my bad. Gamepasses can only be handled in server scripts.

0

Well you can use a remoteevent from the local script and just handle it in the server script.

This discussion is preserved as it was. New answers, comments, and votes are closed.