Character has weird movement

Hello, we are small developers, we are trying to do Slap Battles Fanmade V2 and basicly we want your help. When Player have equipped glove it have weird movement, U CAN SEE VIDEO DOWN (screenshots). We think its problem with hitboxes, maybe it is maybe not. Can someone help us? Thanks -Feather, -D3nielDev.

  • When the player gets slapped with glove and the BodyVelocity is applied the Humanoid or character Destroys

  • Also movement gets weird because part idk??

Down here u have screenshots and videos

imagen_2024-02-25_112017120
Hitbox size: 4.041, 4.537, 4.01
HitEffectPart size: 0.786, 0.823, 0.82
Handle size: 1.121, 0.241, 0.241
MeshPart size: 2.467, 2.695, 1.116

On every cancollide is off

Here u got vid (we transfer cuz its too big)

Here u got code

local Tool = script.Parent.Parent
local DebrisService = game:GetService("Debris")

local Anim = script:WaitForChild("Animation")
local AnimTrack 

local hitChars = {}
local debounce = false
local MS = game:GetService("MarketplaceService")
local x2 = 124242859
local x5 = 124243041
	Tool.Activated:Connect(function()
		if debounce then
			return
		end

		debounce = true

		local humanoid = Tool.Parent:FindFirstChildOfClass("Humanoid")

		AnimTrack = humanoid:LoadAnimation(Anim)
		AnimTrack:AdjustSpeed(tonumber(script.Parent.Parent.SoundHandler.Cooldown.Value/2)) 
		AnimTrack:Play()
		wait(tonumber(script.Parent.Parent.SoundHandler.Cooldown.Value))
		debounce = false
	end)


Tool.Hitbox.Touched:Connect(function(hit)
	if hitChars[hit.Parent] or not debounce then
		return
	end
	if hit.Parent:FindFirstChild("Humanoid") then
		local eChar = hit.Parent
		local plrChar = Tool.Parent
		local SpectatorGloveID = 10
		if game.Players:GetPlayerFromCharacter(eChar) then
			local ePlr = game.Players:GetPlayerFromCharacter(eChar)
			
			if eChar:FindFirstChild("Invincible") then
				return
			end
		end
		local HitEffectFrat = script.Parent.Parent.HitEffectPart:Clone()
		HitEffectFrat.Parent = eChar
		HitEffectFrat.HitEffect1.Enabled = true
		HitEffectFrat.HitEffect2.Enabled = true
		HitEffectFrat.HitEffect1:Emit(5)
		HitEffectFrat.HitEffect2:Emit(5)
		HitEffectFrat.CanCollide = false
		HitEffectFrat.CanTouch = false
		local eHumanRootPart = eChar:FindFirstChild("HumanoidRootPart")
		local plrHumanRootPart = plrChar:FindFirstChild("HumanoidRootPart")

		if plrHumanRootPart and eHumanRootPart then
			script.Parent.Parent.SoundHandler.SlapSound:Play()
			script.Disabled = true
			eChar.Humanoid.Sit = true
			local Invincible = Instance.new("BoolValue")
			Invincible.Name = "Invincible"
			local force = Instance.new("BodyVelocity", eHumanRootPart)
			force.MaxForce = Vector3.new(2,2,2) * math.huge
			local direction = (eHumanRootPart.CFrame.Position - plrHumanRootPart.CFrame.Position).Unit
			force.Velocity = (direction + Vector3.new(0,1,0)).Unit * 30

			

			DebrisService:AddItem(force,0.35)
			
			
			local Ragdoll = require(game:GetService("ReplicatedStorage"):WaitForChild("RagdollCharacterV1"))
			local RiggedChar
			local Ragdolled = false
			if not RiggedChar then
				RiggedChar = Ragdoll:SetupRagdoll(eChar,true)
			end
			if not Ragdolled then
				RiggedChar.Ragdoll(4)
				wait(script.Parent.Parent.SoundHandler.Cooldown.Value - 0.5)
				RiggedChar.Unragdoll()

			end
			eChar.Humanoid.Sit = false
			Invincible:Destroy()
			local player = game.Players:GetPlayerFromCharacter(Tool.Parent)
			if MS:UserOwnsGamePassAsync(player.UserId,x2) and MS:UserOwnsGamePassAsync(player.UserId,x5) then
				player.leaderstats.Slaps.Value = player.leaderstats.Slaps.Value+ 10
			elseif MS:UserOwnsGamePassAsync(player.UserId,x2) then
				player.leaderstats.Slaps.Value = player.leaderstats.Slaps.Value + 2
			elseif  MS:UserOwnsGamePassAsync(player.UserId,x5) then
				player.leaderstats.Slaps.Value = player.leaderstats.Slaps.Value + 5
			else
				player.leaderstats.Slaps.Value = player.leaderstats.Slaps.Value + 1
			end
		end
		hitChars[hit.Parent] = true
		script.Disabled = false
		hitChars[hit.Parent] = nil
	end
end)
1 Like

Try unanchoring the tool and see if that works.

It is already anchored, but thanks for reply!!

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.