I’m trying to make a fist- fighting system and need to communicate between the client and the server to perform the hits, but the remote event won’t fire
Local Script
sp = script.Parent
local tool = sp
local player = game.Players.LocalPlayer
local Mouse = player:GetMouse()
local CombatEvent = game:GetService("ReplicatedStorage").CombatEvent
tool.Equipped:Connect(function()
Mouse.Button1Down:Connect(function()
print("punch")
CombatEvent:FireServer("Punch")
end)
Mouse.Button2Down:Connect(function()
print("block")
CombatEvent:FireServer("Block")
end)
print("equipped")
end)
tool.Unequipped:Connect(function()
print("unequipped")
end)
Server script located In ServerScriptService
local CombatEvent = game.ReplicatedStorage.CombatEvent
print("AAA")
CombatEvent.OnServerEvent:Connect(function(Action)
if Action == "Block" then
print("Blocked Successfully")
end
if Action == "Punch" then
print("Punched Successfully")
end
end)