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)