So basically the server script is not detecting when the remote event is being fired, do anyone know what is wrong?
--local local ReplicatedStorage = game:GetService("ReplicatedStorage") local create = ReplicatedStorage.Events.create local player = game.Players.LocalPlayer local playernam = player.name function onKeyPress(inputObject, gameProcessedEvent) if inputObject.KeyCode == Enum.KeyCode.Q then create:FireServer() print("this is local") end end game:GetService("UserInputService").InputBegan:connect(onKeyPress)
Everything seems right to the local script, it is printing.
--server local ReplicatedStorage = game:GetService("ReplicatedStorage") local create = ReplicatedStorage.Events.create local Workspace = game:GetService("Workspace") create.Name = "createsuit" local function Make() print("this is server") end create.OnServerEvent:Connect(Make)
Now the server script does nothing and there are no console errors, it is located in Replicated Storage...
In the LocalScript I put
game:GetService("UserInputService").InputBegan:Connect(function(Key, Chat) if Key.KeyCode == Enum.KeyCode.R and not Chat then game.ReplicatedStorage:WaitForChild("Create"):FireServer() print("Local") end end)
And in the Server Script i put
game.ReplicatedStorage.Create.OnServerEvent:Connect(function(Player) print("Server") end)
https://developer.roblox.com/api-reference/class/RemoteEvent