Flinging like slap battles

I want to create a fling thing with a tool like slap battles, anyway to do it?

I got this so far:

local function flingPlayer(humanoidRootPart,VectorForce,timeForceActive)
	if humanoidRootPart:FindFirstChild("VectorForce") then
	local attachment = humanoidRootPart:FindFirstChildWhichIsA("Attachment")
	if not attachment then
		attachment = Instance.new('Attachment')
		attachment.Parent = humanoidRootPart
		attachment.WorldPosition = humanoidRootPart.Position
		attachment.WorldOrientation = humanoidRootPart.Orientation
	local vectorForce = Instance.new('VectorForce')
	vectorForce.Force = VectorForce
	vectorForce.ApplyAtCenterOfMass = true
	vectorForce.RelativeTo = Enum.ActuatorRelativeTo.Attachment1
	vectorForce.Attachment0 = attachment
1 Like

From what I remember, the reason that won’t work properly is because of physics streaming. The client is responsible for calculating the physics for the player, so if you want to apply a force to it like that then you’ll have to set the network ownership of the player to nil temporarily and once the fling is over, set it back to the player.

Uhh… what???
I’m confused…

Also, your vectorForce has no parent.


local function flingPlayer(humanoidRootPart,VectorForce,timeForceActive)
	if humanoidRootPart:FindFirstChild("BodyVelocity") then
	if humanoidRootPart:IsA("Part") and humanoidRootPart.Parent:FindFirstChild("Humanoid") then
		local bodyVel = Instance.new("BodyVelocity")
		bodyVel.MaxForce = Vector3.new(10^10,10^10,10^10)
		bodyVel.Velocity = VectorForce * 100 -- number is speed if vector force is a vector 3 with mag 1.
		bodyVel.Parent = humanoidRootPart

It’s too powerful, it flings them to nowhere?

What is vector force? is it a normal or a position or a instance?

it adds velocity to the person in the direction of vector3.new(), kinda like position

and with the amount of power from the vector3

Ohh. Look in the script, I multiplyed the vector force by 100 just incase you didn’t, try agian and remove the * 100.

remove the times 100.

bodyVel.Velocity = VectorForce * 100 -- number is speed if vector force is a vector 3 with mag 1

basically vector3.new(0, 5000, 0)
flings in the y direction and with 5000 power i believe, and added with velocity

not that sure

changed it to 1, still too powerful

Does the player disappear or just fling real quick? If so then you can try two things, divide the vector force by a number to lower it or lower the max force.

The player disappears, instantly too.

However I’m trying this with a dummy.

Try lowering the max force. What is the vector force itself? Add a print inside the function and print the vector force and that could help use.

I lowered it to 10^4.25, however it not going fowards of the players humanoidrootpart, its flinging behind the players humanoidrootpart.

Thats because of the vector your supplying to the function. Are you using look vector of the root part so that its in the facing direction of the root part?

I want to do that…
chars chars chars