Why Wont My Weapon Work?

Hello developers! I am creating custom weapons for my medieval group and I have come across a problem. In my testing game the weapon works. But in a training game for my group, it doesn’t. I tried put it in another of our games but it still didn’t work. What’s wrong?!?

robloxapp-20230612-1544152.wmv (2.0 MB)
(Does not work here ^)

robloxapp-20230612-1546091.wmv (2.3 MB)
(It works fine here! ^)

Here is some of the code for the swinging down part as well as a picture of the explorer area:

local DownStrike = script.DownStrike
local Tool = script.Parent
local ready = true

Tool.Activated:Connect(function()
	local Character = Tool.Parent
	if Character then 
		local Humanoid = Character:FindFirstChildWhichIsA("Humanoid")
		if Humanoid then
			local LoadedAnim = nil
			LoadedAnim = Humanoid:LoadAnimation(DownStrike)
			if LoadedAnim and ready == true then
				LoadedAnim:Play()
				wait(.54)
				script.Parent.Swing:Play()
				ready = false
				
				wait(1)

				ready = true
			end
		end
	end
end)

Explorer

That is all. I would be very thankful if someone could solve this problem for me.
(I should mention that those links are videos, and that all the code works. Or at least in the test game it does.)

Is the swing animation a default Roblox one or one made by you? If it’s made by you, is it published under the group? If it isn’t published under the group, that’s probably the issue.

2 Likes

I think that might be it. I tried it publish it, but studio always crashed. No clue why. Ill try again! Thanks!