i seriously have no idea and btw there arent any output errors however nothing happens i checked the id and its correct
no output error but nothing happens maybe ill just use a premade animation because i think something went wrong with mine
cuz i really feel like its just the animation gone wrong
im stupid so idk how i mean i made the animation but idk how to show it
im incredibly new to studio so theres alot of things i dont know
All it does is say “Sword swing animation by Pish85” (That’s the name of it)
right clicking doesnt work either
for some reason there is no import button
i went to anim editor → rig → … → import → to roblox
OHHHHH
now ive clicked save what do i do now
bruh i tried to make a better version with every step but file was too large
Hello rip_Zephyr I made my own tool animation local script!, I hope it works even though your animation thing is not working but maybe you can try this?
If it doesn’t work then I would suggest it being the animation itself because I tested it in game and it seems to work with me.
This script should clear out the events upon death and unequipping for memory leaking
Hope it works
local player = game:GetService("Players").LocalPlayer
local EquipConnection, ActivateConnection, HumanoidConnection, UnequipConnection
local Character, Humanoid, Animator
local SwingAnimation
local function OnActivate()
if not SwingAnimation or SwingAnimation.IsPlaying then return end SwingAnimation:Play()
end
local function OnUnequip()
SwingAnimation:Stop(0)
ActivateConnection:Disconnect() UnequipConnection:Disconnect() HumanoidConnection:Disconnect()
SwingAnimation = nil UnequipConnection = nil HumanoidConnection = nil
end
local function OnDeath()
EquipConnection:Disconnect()
EquipConnection = nil
OnUnequip()
end
local function OnEquip()
Character = player.Character or player.CharacterAdded:Wait()
Humanoid = Character:WaitForChild("Humanoid")
Animator = Humanoid.Animator
SwingAnimation = Animator:LoadAnimation(script:WaitForChild("SwingAnimation"))
HumanoidConnection = Humanoid.Died:Connect(OnDeath)
UnequipConnection = tool.Unequipped:Connect(OnUnequip)
ActivateConnection = tool.Activated:Connect(OnActivate)
end
EquipConnection = tool.Equipped:Connect(OnEquip)
k thanks ill try it out see if it works!
sadly it gives me an output error on line 36 (i changed the swing animation id to my own btw)
Do you know where it says the error
Or the cause
15:15:55.035 Zephyr’s Game @ 23 Jun 2024 15:15 auto-recovery file was created - Studio
15:15:55.755 Players.Pish85.Backpack.Sword.LocalScript:36: attempt to index nil with ‘Equipped’ - Client - LocalScript:36
15:15:55.756 Stack Begin - Studio
15:15:55.756 Script ‘Players.Pish85.Backpack.Sword.LocalScript’, Line 36 - Studio - LocalScript:36
15:15:55.756 Stack End - Studio
15:15:57.960 Disconnect from ::ffff:127.0.0.1|61996 - Studio
The error is 15:15:55:755 Players.Pish85.Backpack.Sword.LocalScript:36…