local module = {} local repStorage = game:GetService("ReplicatedStorage").Remotes.Events local remote = repStorage:WaitForChild("M1") local remoteKB = repStorage:WaitForChild("KB") function fireAllExcept(remote, plrExc, trgt, tip) for i, v in game.Players:GetPlayers() do if v == plrExc then continue end remote:FireClient(trgt, tip) end end function module.Initialize() remote.OnServerEvent:Connect(function(plr, target: Humanoid, tipe) print("esdq") if tipe == "b" then target:TakeDamage(10) local char : BasePart= target.Parent.HumanoidRootPart --[[ local linVel = script.LinearVelocity:Clone() local att = Instance.new("Attachment", char) linVel.Attachment0 = att linVel.VectorVelocity = plr.Character.HumanoidRootPart.CFrame.LookVector * 40 game.Debris:AddItem(linVel, .3) ]] --local og = char:GetNetworkOwner() --char:SetNetworkOwner(plr) if game.Players:GetPlayerFromCharacter(char) then remoteKB:FireClient(game.Players:GetPlayerFromCharacter(char), plr.Character.HumanoidRootPart.CFrame.LookVector * 20, tipe) fireAllExcept(remote, plr, target, "ba") else local fecForce = script.BodyVelocity:Clone() fecForce.MaxForce = Vector3.new(math.huge,0,math.huge) fecForce.Parent = char fecForce.Velocity = plr.Character.HumanoidRootPart.CFrame.LookVector * 20 game.Debris:AddItem(fecForce, .3) fireAllExcept(remote, plr, target, "ba") end --task.wait(.3) --char:SetNetworkOwner(og) end end) end return module