Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

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

Asked by
Nootian 184
5 years ago
Edited 5 years ago

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

01local UserInputService = game:GetService("UserInputService")
02Print("Local Script")
03function Began(Input)
04    Print(Input)
05end
06function Ended(Output)
07    Print(Output)
08end
09UserInputService.InputBegan:Connect(Began)
10UserInputService.InputEnded:Connect(Ended)

For the first Player this is the output:

1Local Script
2Input
3Output

For the second Player this is the output:

1Local Script

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

1 answer

Log in to vote
0
Answered by
Arj783 72
5 years ago

You haven't done

1local UserInputService = game:GetService("UserInputService")

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

0
That is not the case, I just forgot to add that to the question, whoops Nootian 184 — 5y
0
Thanks for trying to help me though Nootian 184 — 5y
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. Arj783 72 — 5y
Ad

Answer this question