I get neither “user” output nor “space” output for this code. Where is the mistake?
local UserInputService = game:GetService("UserInputService")
UserInputService.InputBegan:Connect(function(input)
print("user")
if input.KeyCode == Enum.KeyCode.Space then
print("Space")
end
end)
" Since this service is client-side only, it will only work when used in a LocalScript or a ModuleScript required by a LocalScript. As UserInputService is client-side only, users in the game can only detect their own input - and not the input of others. "
The most common place for remote event for developers is Replicated storage. It’s all on developer preference, as long as it exists on the client (player) and the server. (For example, it can’t be in Server storage because it only exists on the Server, however it could be in workspace as workspace is replicated to both the client and the server) it just makes most sense for it to be in Replicated storage but the real reason is preference as long as it exists for the server and client