I'm trying to make it so when somethings hit body position only affects the person hit
local function onTouched(hit)
if hit.Parent ~= nil and hit.Parent:FindFirstChild("Humanoid") ~= nil and hit.Parent:FindFirstChild("Humanoid") ~= pchar.Humanoid and check == 0 then
new.Transparency = 0.4
local qq = Instance.new("BodyPosition")
qq.Position = new.Position
qq.Parent = pchar["UpperTorso"]
qq.MaxForce = Vector3.new(1e8,1e8,1e8)
qq.P = 100
qq.D = 10
debris:AddItem(qq,5)
end
end
I tried this but it sucks up everyone that's anywhere near it

6 comments
well first off, what is pchar?
I'm assuming that pchar is suppose to be the Player's Character. But where did you define it at? We need to know that in order to help you
yeah pchar is the local player
its defined at the top of the entire function so not in this function specifically
the if statement is designed so the player creating this isn't hit, which works but the player is affected by the body velocity created by the script as well as other players that aren't hit
the body position* sorry