--Local Script function swinging() local anim = plr.Character.Humanoid:LoadAnimation(script.QuickSwing) anim:Play() anim:GetMarkerReachedSignal("HurtboxStart"):Wait() print("Found it") attEvent:FireServer("HurtStart") anim.Stopped:Wait() attEvent:FireServer("HurtEnd") end --Server Script event.OnServerEvent:Connect(function(plr, name) print("Test") if name == "HurtStart" then storedSpeed = plr.Character.Humanoid.WalkSpeed plr.Character.Humanoid.WalkSpeed = 3 hurtActive = true hit = nil hurtCheck(plr) elseif name == "HurtEnd" then hurtActive = false plr.Character.Humanoid.WalkSpeed = storedSpeed end end)
Okay. I really don't understand what's going on here. For some reason when I attempt to fire the server the script fires the server twice. The "Found it" prints once, indicating that it only fires it once but for some reason the OnServerEvent triggers twice each time it's called. So what should print "Test" twice gives me "Found it" once and then "Test" fours times. I've tested this by completely removing everything except the print("Test") from the server script and it's just the same result. I can't tell if this is a coding error or just a roblox bug because I'm essentially being told I'm getting the results of two completely different scenarios.