In my game I have a weapon called the Tornado Blade that causes the player to spin around while they hold down the mouse button. It's been in the game for months without any issues being reported, until today. I have one single player who has an issue where they get stuck in the spinning animation even after un-equipping the weapon. They say that this happens everytime they try to use it. I've tried and tried to replicate it myself but haven't been able to.

Here's the script that the Tornado Blade uses.

local Tool = script.Parent
local UIS = game:GetService("UserInputService")
local event = Tool:WaitForChild("RemoteEvent")
local canPlayEvent = Tool:WaitForChild("canPlayEvent")
local canDestroyEvent = Tool:WaitForChild("canDestroyEvent")
local canDestroy = false
local remoteEventEnd = Tool:WaitForChild("RemoteEventEnd")
local canPlayEventF = Tool:WaitForChild("canPlayEventF")
local handle = Tool:WaitForChild("Handle")
local used = false
local canNotDestroyEvent= Tool:WaitForChild("canNotDestroyEvent")


UIS.InputBegan:Connect(function(input,gameProcessedEvent)
	if equipped == true then
		if input.UserInputType == Enum.UserInputType.MouseButton1 then
			used = true
			local readyTrack = script:WaitForChild("ReadyAttack")
			local readyAtt = humanoid:LoadAnimation(readyTrack)
			readyAtt:Play()
			wait()
			local animTrack = script:WaitForChild("Animation")
			s = humanoid:LoadAnimation(animTrack)
			if s then
				--print("Animation loaded into humanoid")
				--print(humanoid.Parent)
			end
			s:Play()
			canPlayEventF:FireServer()
			chainsawSound = handle:WaitForChild("ChainsawSound")
			chainsawSound:Play()
			while used do
				canDestroy = true
				if canDestroy == true then
					canDestroyEvent:FireServer()
					wait(.5)
					canNotDestroyEvent:FireServer()
				end
			end
		end
	end
end)

UIS.InputEnded:Connect(function(input, gameProcessedEvent)
	if equipped == true and used == true then
		if input.UserInputType == Enum.UserInputType.MouseButton1 then
			used = false
			canPlayEvent:FireServer()
			chainsawSound:Stop()
			s:Stop()
		
		end
	end
end)


function onEquip ()
	humanoid = Tool.Parent:FindFirstChild("Humanoid")
	equipped = true
	local idleAnimTrack = script:WaitForChild("Idle")
	idleAnim = humanoid:LoadAnimation(idleAnimTrack)
	idleAnim:Play()
	canPlayEvent:FireServer()
end

function onUnEquip()
	equipped = false
	character = nil	
	idleAnim:Stop()
	s:Stop()
	chainsawSound:Stop()
	
end

Tool.Equipped:Connect(onEquip)
Tool.Unequipped:Connect(onUnEquip)

Any ideas what may be causing it to malfunction for only that one player? Or how I can put a check into it to prevent it from happening?

7 comments

0

What is their name and are they R15 or R6

0

Their name is AbbaLeStrange88, they have the mage animations equipped, so I'm assuming that they must be R15, and my game morphs players into R15 anyway.

0

Oh, do you see any errors in the Output?

0

Just checked, there are no errors in the output when it happens. I found out that it only happens when she clicks the icon to un-equip, but works normally when she uses the number key associated with it.

0

So it's the tool itself that breaks it? Ask her to try with a different animation enabled to see if that is the problem.

0

It still persists when she uses the default animations. I've had several other people in-game with us, all trying to copy her and it just isn't happening to anyone else. The tool itself is supposed to stop the animation when Unequipped is fired. She equips the tools, spins, then clicks the icon to unequip. Her avatar stopped spinning, put the weapon away, and then started spinning again.

0

If it isn't her animation that is breaking it then maybe it is something she is wearing? I'm really not sure in the slightest at what is happening.