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)
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.)