Remote Event not working

Hello, I have a really stupid problem with remote events. For some reason, it won’t work even though I am using the most simplest way.

the script on the client on a local script:

local UIS = game:GetService("UserInputService")
local Player = game:GetService("Players")
local ReplicatedStorage = game:GetService("ReplicatedStorage")
local RunMove = ReplicatedStorage:WaitForChild("RunMove")

UIS.InputBegan:Connect(function(input)
	if input.KeyCode == Enum.KeyCode.E then
		RunMove:FireServer()
	end
end)

the script on the server in a normal script :

local UIS = game:GetService("UserInputService")
local Player = game:GetService("Players")
local ReplicatedStorage = game:GetService("ReplicatedStorage")
local RunMove = ReplicatedStorage:WaitForChild("RunMove")


RunMove.OnServerEvent:Connect(function()
	print("event went trough ready to finish")
	
end)
1 Like

Is there any warning or error in the console?

Also UserInputService cant be used in a normal script

For some reason, there is no error message or warning

and i removed that line with UserInputServer

Try removing the UserInputService variable in the normal script.

Can i see where both scripts are located?

The localscript is inside the script and the script is in the StarterPlayerScripts

I found out what I did wrong. It needed to be in the StarterCharacterScripts, not StarterPlayerScripts

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.