haviaree
(haviaree)
February 15, 2024, 6:01am
1
havent really found anything anywhere talking about this issue so
External Media
equipping the tool again fixes the movement, it only occurs when the torso is moved, (the other tool doesnt move the torso, when modified to move the torso, same bug when unequipping during the animation)
1 Like
Scottifly
(Scottifly)
February 15, 2024, 6:49am
2
Are all the Parts in the Tool Massless?
Also, post your script here because we can’t tell what it is doing.
Copy/paste it and put 3 backticks before and after it to format it properly here.
haviaree
(haviaree)
February 15, 2024, 7:01am
3
Yes, all the parts in the tool are massless,
local tool = script.Parent
local handle = tool.Bandle
local anims = tool.anims
local Character
local raycasthitbox = require(game.ServerScriptService.RaycastHitboxV4)
local hitbox = raycasthitbox.new(tool.Bandle)
script.Parent.Equipped:Connect(function()
Character = tool.Parent
local Torso = script.Parent.Parent:WaitForChild("Torso")
local Weld = Instance.new("Motor6D", Torso)
Weld.Name = "remoa"
Weld.Part0 = Torso
Weld.Part1 = handle
end)
local de = false
local canhit = false
config = {
damage = 25,
attacktime = 0.25,
cooldown = 4
}
hitbox.OnHit:Connect(function(hit,humanoid)
if canhit == false then return end
if humanoid.Parent ~= script.Parent.Parent then
if humanoid.Parent.IsBlocking.Value == false then
humanoid.Parent.Torso.damaged.Enabled = true
local damageanims = tool.damageanims:GetChildren()
local selected = humanoid:LoadAnimation(damageanims[math.random(1,#damageanims)])
selected:Play()
humanoid:TakeDamage(config.damage)
script.Parent.Bandle.smack:Play()
local character = humanoid.Parent
task.wait(0.1)
canhit = false
humanoid.Parent.Torso.damaged.Enabled = false
else
humanoid.Parent.Torso.damaged.Enabled = true
task.wait(0.1)
canhit = false
humanoid.Parent.Torso.damaged.Enabled = false
return
end
end
canhit = true
end)
script.Parent.hit.OnServerEvent:Connect(function(player)
local isBlocking = player.Character.IsBlocking
local isAttacking = player.Character.IsAttacking
if de == false and isBlocking.Value == false and isAttacking.Value == false then
de = true
isAttacking.Value = true
script.Parent.Bandle.SwingSound:Play()
local humanoid = player.Character.Humanoid
local animationslist = anims:GetChildren()
local selected = humanoid:LoadAnimation(animationslist[math.random(1,#animationslist)])
selected:Play()
script.Parent.Unequipped:Connect(function()
script.Parent.Bandle.SwingSound:Stop()
selected:Stop()
end)
task.wait(0.1)
hitbox:HitStart()
canhit = true
script.Parent.Unequipped:Connect(function()
script.Parent.Bandle.SwingSound:Stop()
hitbox:HitStop()
selected:Stop()
end)
wait(config.attacktime)
canhit = false
hitbox:HitStop()
wait(0.5)
isAttacking.Value = false
wait(config.cooldown-0.5)
de = false
end
end)
script.Parent.Unequipped:Connect(function()
local remoa = Character["Torso"]:WaitForChild("remoa")
remoa:Destroy()
end)