So I made a wall that knocks back players this Is the script:
(BTW I DIDN'T ADD BODY VELOCITY BECAUSE ITS DEPCERATED)
script.Parent.Touched:Connect(function(hit) local humanoid = hit.Parent:WaitForChild("Humanoid") if humanoid then local KnockBack = Instance.new("VectorForce") KnockBack.Parent = humanoid.Parent KnockBack.Attachment0 = humanoid.Torso KnockBack.Force = Vector3.new(-1000,0,0) end end)
Hm, maybe try switching out :WaitForChild("Humanoid") for :FindFirstChild("Humanoid")?
Also, Attachment0 is for an attachment. Here, try this.
script.Parent.Touched:Connect(function(hit) local humanoid = hit.Parent:FindFirstChild("Humanoid") if humanoid then if not humanoid.Parent.Torso:FindFirstChild("VectorForce") then local KnockBack = Instance.new("VectorForce") local Attachment = Instance.new("Attachment") Attachment.Parent = humanoid.Parent.Torso KnockBack.Parent = humanoid.Parent.Torso KnockBack.ApplyAtCenterOfMass = true KnockBack.Attachment0 = Attachment KnockBack.Force = Vector3.new(0,3000,6000) humanoid.Jump = true game:GetService("Debris"):AddItem(KnockBack,0.5) game:GetService("Debris"):AddItem(Attachment,0.5) end end end)