Hi, I have a combat system that relies on a specific marker in the animation to trigger the hitbox and once triggered its disconnected, so players have time to react, but in that time if another player hits the person in the punch animation before the marker is reached it stops the animation, but what happens to that marker event that was never reached?
local hitmarker: RBXScriptConnection
hitmarker = AnimationTrack:GetMarkerReachedSignal("hitmarker"):Connect(function()
hitmarker:Disconnect()
end)
All connections use a bit of memory, everything uses memory, you should try and disconnect and clear anything that won’t be used anymore, or it’s going to be hogging up a bit of memory. Even variables inside scripts use memory, so while I doubt you ever run into such a situation where you need to worry about scripts using a bit more memory than is required, you should generally clear stuff when it has a chance to become a problem later on.