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

UserInputService and other In- Game events Stops working after the first player, why is that?

In a local script(game.StarterPlayer.StarterCharacterScripts.LocalScript), I put this:

local UserInputService = game:GetService("UserInputService")
Print("Local Script")
function Began(Input)
	Print(Input)
end
function Ended(Output)
	Print(Output)
end
UserInputService.InputBegan:Connect(Began)
UserInputService.InputEnded:Connect(Ended)

For the first Player this is the output:

Local Script
Input
Output

For the second Player this is the output:

Local Script

Btw, I have tested this with other people as well as myself

1 answer

You haven't done

local UserInputService = game:GetService("UserInputService")

If that isn't the case then I'm not sure.

3 comments

0

That is not the case, I just forgot to add that to the question, whoops

0

Thanks for trying to help me though

0

I only have one final answer, change it to UserInputService.InputBegan:Connect(function(input) because it might get confused what your input is. Try it like this.

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