Remove the WaitForChild, in my script I have never needed it
so uh this?
Connection = tool("Handle").Touched:Connect(onTouch)
no
tool.Handle.Touched:Connect(onTouch)
Ok. What next?
Run the script although it will not work, just want to test.
Ya I still get the error message
Players.trueblockhead101.Backpack.Stick.Slash:36: attempt to index nil with ‘FindFirstChild’
Are you slashing an NPC? Just want to make sure
local function OnTouch(partOther)
if db1 then
if dbAnim then
local character = partOther.Parent
local humanOther = character:FindFirstChild("Humanoid")
if not humanOther then return end
if humanOther.Parent == tool then return end
local player = Players:GetPlayerFromCharacter(character)
if player and (player == Player or IsTeamMate(Player, player)) then
return
end
UntagHumanoid(humanOther)
TagHumanoid(humanOther, Player)
humanOther:TakeDamage(damage)
db1 = false
end
end
end
Yes I am
Where do i put this in the script
above the input service. This should fix the script
I don’t get an error message anymore. Though save data script still won’t work…
What could possibly be wrong?
So the sword script works now?
Ye I dont get the error message. Though save data still won’t work.
Go to game settings and turn on http and API it is in security
They are both on, though save data STILL wont work. What the heck is going on!?!?!?
is it in ServerScriptService as a regular Script
Yep it is…
Can you setup a copy of your game and delete some parts of it so I cannot copy it with the dataSave and teamcreate it. I don’t know what else to do