So i am woundering why isn't this working to transfer this hit function from a local script to a server script with a remote event.
Local Script:
mouse.Button1Down:connect(function()
local value = Stats[Equipped]["Cooldown"]
if not cooldown and not Attacking then
local playAnim = char.Humanoid:LoadAnimation(anim)
playAnim:Play()
if not cooldown then
Attacking = true
end
if Class == "Axe" then
local weapon = ActiveWeapon:FindFirstChild(Equipped)
if Attacking == true then
weapon["Blade"].Touched:connect(function(hit)
if hit.Parent:FindFirstChild("Humanoid") then
if not deb then
deb = true
Remotes["TakeDamage"]:FireServer(hit, Stats[Equipped]["Damage"])
end
end
end)
end
end
-- WEAPON COOLDOWN SYSTEM --
for i = value,0,-1 do
cooldown = true
wait(.65)
end
cooldown = false
Attacking = false
deb = false
end
end)
Server Script:
Remotes["TakeDamage"].OnServerEvent:connect(function(hit, dmg)
print(hit.Parent.Name)
if hit.Parent:FindFirstChild("Humanoid") then
hit.Parent:FindFirstChild("Humanoid"):TakeDamage(dmg)
end
end)

6 comments
Why do you need a remote event... just use the server script
Cause i need it to fire when you click the mouse
Please provide more context, Any errors? How exactly is it not working. no damage is being outputted, the event isn't even firing? Also, show us the full local script, where you define the remoteevent. Also, use :Connect instead of :connect
Whats the differense between :connect and :Connect?
There are 2 differences. 1) They are capitalized differently 2) :connect is deprecated, and :Connect is not.
Using :Connect will appease hiimgoodpack so he doesn't get mad at you.