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
4 years ago
Edited 4 years ago

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

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

You haven't done

local 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 — 4y
0
Thanks for trying to help me though Nootian 184 — 4y
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 — 4y
Ad

Answer this question