Script Is Not Working

server script:

local remote = game.ReplicatedStorage:WaitForChild("Hitted1")

remote.OnServerEvent:Connect(function(plr, target, mouseCFrame)
	if plr then
		if plr.Parent:FindFirstChild("Humanoid") then
			local lookVector = mouseCFrame.LookVector --Gets mouse CFrame

			if mouseCFrame.LookVector.Y < 0 then 
				lookVector = mouseCFrame.LookVector *,-1,1) --This is only to make player knockback upwards, and not downwards. You can remove this if you want.

			local root = plr.Parent.HumanoidRootPart
			local velocity ="BodyVelocity")

			local humanoid = plr.Character:WaitForChild("Humanoid")

			velocity.MaxForce =, math.huge, math.huge)
			velocity.P = 1500
			velocity.Velocity = lookVector * 5 *, 5, 5) --Get mouse direction and increases it, you can mess around with this values until you find a good one
			velocity.Parent = root

this script above works yesterday now it’s not working and no errors
any help will work and post with the script

try printing something inside the if statements under remote.OnServerEvent thing and see if it prints?

Try replacing this:

if plr.Parent:FindFirstChild("Humanoid") then


if plr.Character:FindFirstChild("Humanoid") then

as well as all other times you called plr.Parent (replace them with plr.Character)

1 Like

This is working.

Is it just me, or this the OP create 4 duplicates of the exact same topic?