Signal from remote event isn’t received on the server
//Simplified Server Script
local Activate_Pickaxe_Event = game:GetService("ReplicatedStorage").Events.RemoteEvents.Activate_Pickaxe_Event
Players.PlayerAdded:Connect(function(Player)
Player.CharacterAdded:Connect(function(Character)
local TouchingParts
local ClickCooldown = false
local debounce = false
Activate_Pickaxe_Event.OnServerEvent:Connect(function(plr)
print("received")
end)
end)
end)
//Full Client Script
local Pickaxe = script.Parent
local Activate_Pickaxe_Event = game:GetService("ReplicatedStorage").Events.RemoteEvents.Activate_Pickaxe_Event
local LocalPlayer = game:GetService("Players").LocalPlayer
local Character = LocalPlayer.Character or LocalPlayer.CharacterAdded:Wait()
local Humanoid = Character:WaitForChild("Humanoid")
local MineAnimation = Pickaxe:FindFirstChild("MineAnimation")
local LoadedAnimation = Humanoid:LoadAnimation(MineAnimation)
local AnimationDebounce = false
Pickaxe.Activated:Connect(function()
if not AnimationDebounce then
AnimationDebounce = true
Activate_Pickaxe_Event:FireServer()
LoadedAnimation:Play()
task.wait(0.4)
AnimationDebounce = false
print("fired")
else
return
end
end)
Explorer:
Output:
Issue: “received” doesnt get printed, so the OnServerEvent doesnt run
Thank you