Im trying to make a script, where i basically use a KeyDown function and it freezes all the players around me, BUT ME, and after 5 seconds it unfreezes them, anyone know where i can find what kind of things i need to know for making such a script? like what i need to learn for it. THIS IS NOT A REQUEST BTW, JUST ASKING WHERE I CAN LEARN.
crome60's comment is correct, but here's a little more detail on the steps:
(theirPos - yourPos).magnitude
, where 'theirPos' and 'yourPos' is a Vector3) is <= 10 (or whatever distance you like), then they are close enough for the freeze effect to be applied (consider anchoring them in that case). Also, add their name to a table for later, or perhaps (if you're anchoring their HumanoidRootPart) just add that Part to the table and unanchor it later. (If you have anchored all their limbs, then you might want to add all their parts to the table.)You may need to learn about tables.
What I would do is disable the control script under LocalPlayer.PlayerScripts
. This will make it so the player is unable to move. Then I would create a block of ice around the player's torso. Later I will enable the control script, then destroy the block ice.