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.

2 comments
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.
Well you can use a remoteevent from the local script and just handle it in the server script.