For some odd reason, the local function for my combat isn't working. I've tried looking through it multiple times to look for server functions that aren't supposed to be in the local script, but it still continues to do act the same.
Here is the block of code(Don't pay attention to the commented lines):
local function combat() if equipped==false or player.Character:FindFirstChild("BlockValue").Value==1 then return end print("Test complete 1") ---------------- punching animations ---------------------------------- local punch = Instance.new("Animation") punch.AnimationId = "http://www.roblox.com/asset/?id=03643750429" local loadanim1 = humanoid:LoadAnimation(punch) local punchh = Instance.new("Animation") punchh.AnimationId = "http://www.roblox.com/asset/?id=03643732182" local loadanim = humanoid:LoadAnimation(punchh) ------------------ combo stuff -------------------------------------- if P == false and P2 == false then db = true enableDamage:FireServer() loadanim:Play() wait(.4) loadanim:Stop() disableDamage:FireServer() P = true db = false repeat wait() until loadanim:Stop() end --local effects = math.random(1,5) if P == true and P2 == false then db = false wait(.8) enableDamage:FireServer() loadanim1:Play() ------- --if effects == 3 then ---Remote:FireServer() --print("Knockback") ------- wait(.4) loadanim1:Stop() disableDamage:FireServer() P = false P2 = false db = false --end repeat wait() until loadanim1:Stop() end ------------------------------ combo end ------------------------------- end
Note: The local function is called when the player presses they're M1 while a tool is equipped. Also, P/P2 are both variables to make sure the server switches the arm animations.
If you wish for me to be more specific please do so.