Reputation: 118
I am working with User Input Service to make a snake game within Roblox, and the event, Input Began, is not firing. I even copied code from the official Roblox website to teach how to script, and nothing happened. What could be going wrong?
Upvotes: 0
Views: 472
Reputation: 7188
UserInputService only works in LocalScripts, and according to the docs :
A LocalScript will only run Lua code if it is a descendant of one of the following objects:
- A Player’s Backpack, such as a child of a Tool
- A Player’s character model
- A Player’s PlayerGui
- A Player’s PlayerScripts.
- The ReplicatedFirst service
Double check that your LocalScript is in one of those locations and that it is not Disabled.
Upvotes: 1