Update: Added a limit for the CharacterSize calculation so that it cannot crash the game in case the character is too massive or its body parts fling off
Changed “Part” on line 173 to “BasePart”
I did not think about rigs that use WedgePart & Sphere parts, also just learned this recently
for _, v in ipairs(Target:GetDescendants()) do
-- If we find a part, cover it in a randomized ice mesh
if v:IsA("BasePart") and not v:FindFirstChildOfClass("SpecialMesh") then
IsA("Part") --> IsA("BasePart")
Now also freezes the animation of a rig without Humanoid object by checking their AnimationController
elseif Target:FindFirstChildOfClass("AnimationController") then
local AnimationController = Target:FindFirstChildOfClass("AnimationController")
local Animator = AnimationController:WaitForChild("Animator", 10)
for i, v in pairs(Animator:GetPlayingAnimationTracks()) do
v:AdjustSpeed(0)
v:Stop()
end
task.wait(Duration)
-- Continue playing the animation
for i, v in pairs(Animator:GetPlayingAnimationTracks()) do
v:AdjustSpeed(1)
end
end
Huge update!
Since someone asked me, I spent quite a while to make this, introducing…
The secondary, modified version that comes with an UNFREEZE function (No duration)
Separate Freeze & Unfreeze functions, so there’s no duration in this version
Targets’ Walkspeed & JumpPower are stored in a weak table (No worries they don’t overlap each other) and then set back to the stored WS & JP when you call the unfreeze function on the same targets
Make sure to check the new examples (Parented inside the modified module) if you don’t know how to use!
Frozen:
The mech has no Humanoid, just an AnimationController, works perfectly
Unfrozen:
Walkspeed & JumpPower were randomly assigned before running, and they went back to the original values without any issues!
Note: This modified version has nothing to do with the first version. Both are up-to-date without issues from my play testing. The choice is yours, feel free to modify them to your liking
Hi
Thanks for reporting
It seems like Roblox layered clothing is quite weird so after doing some testing for an hour, I decided to exclude them from the freezable parts and added an extra setting
They will always be buggy while being frozen if an extra part is added to the character
But they return to normal after being unfrozen so I think that shouldn’t be a problem
Who needs to freeze clothes anyways?
(Yes I used your character and also wore some layered clothes)
Ngl I was a bit skeptical about it adapting to any kind of rig so I just tested it and it actually works extremely well to my surprise, since I’m working on a kind of UT/DR game I will use it, its a pretty good module ngl, good job mate!
Incase you might wanna know what I used it for, here it is lol
Thanks for using it and sharing your experience!
About the “All type of rigs” part in this post, I just put this there in case people wonder if it works in their game, I’m really excited to see more games use it instead of a boring ice cube when frozen lol
Hey, while I don’t use this module specifically and have my own, I just like to say that I really like what you did with it. How it works with ragdolls and everything because of the weld constraints, good job man!
Heya buddy, after multiple test of your module and with a 30+ active players game for testing and benchmarking i see when freezing people it make a high fps drop spikes and unfreeze aswell , if you can fix it, it would be awesome otherwise i’ll just fix it in my free time