The error says "ServerScriptService.game:29: attempt to index nil with 'FindFirstChild' ."
I tried the see if it works without FindFirstChild but that still didn't work.
Here is the script
Local script
local delayTime = 0.65
local debounce = false
local player = game:GetService("Players").LocalPlayer
local tool = script.Parent
script.Parent.Activated:connect(function(player,tool)
game.ReplicatedStorage.Swing:FireServer()
end)
Server Script
local debounce = false
RepStorage.Swing.OnServerEvent:connect(function(player,tool)
if not debounce then
debounce = true
tool:FindFirstChild("Handle").Touched:connect(function(hit)
if hit.Name == "treeHitBox" then
print("YOU HIT THE TREE")
end
end)
debounce = false
end
end)
Image Link of Explorer

1 comment
is everything already defined?