Skip to content
TheChatArchiveThe Chat Archive
gpt-4.1-mini-2025-04-14· OpenAIAi2 WildChat-4.8M (AI2)

can you make this script work only if specifiedplayer said q and everything will go back…

  1. User

    can you make this script work only if specifiedplayer said q and everything will go back to default and the script will stop working when specifiedplayer said e? local Players = game:GetService("Players") local RunService = game:GetService("RunService")

    local specifiedPlayer = Players:FindFirstChild("minifandesktop") local altplayer1 = Players:FindFirstChild("dekstopminikey") local altplayer2 = Players:FindFirstChild("desktopremotev") local altplayer3 = Players:FindFirstChild("desktopmousec") local altplayer4 = Players:FindFirstChild("desktopbook") local altplayer5 = Players:FindFirstChild("desktoptoolbox")

    if not (specifiedPlayer and altplayer1 and altplayer2 and altplayer3 and altplayer4 and altplayer5) then warn("One or more players not found!") return end

    local SP_MOVE_THRESHOLD = 0.1 local SPIN_SPEED = 10

    local function getTorsoCFrame(player) local character = player.Character if character then local torso = character:FindFirstChild("Torso") or character:FindFirstChild("UpperTorso") if torso then return torso.CFrame end end return nil end

    local function getHumanoid(player) local character = player.Character if character then return character:FindFirstChildOfClass("Humanoid") end return nil end

    local function getHumanoidRootPart(player) local character = player.Character if character then return character:FindFirstChild("HumanoidRootPart") end return nil end

    local baseRotationOffset = CFrame.Angles(math.rad(-90), 0, math.rad(-90))

    local function setTorsoCFrame(player, cframe) if player.Character then local humanoid = player.Character:FindFirstChildOfClass("Humanoid") local torso = player.Character:FindFirstChild("Torso") or player.Character:FindFirstChild("UpperTorso") if torso then if humanoid then humanoid.PlatformStand = true end torso.CFrame = cframe end end end

    local function setupSpecifiedPlayer() local humanoid = getHumanoid(specifiedPlayer) if humanoid then humanoid.WalkSpeed = 30 humanoid.HipHeight = 3 end

    specifiedPlayer.CharacterAdded:Connect(function(char)
        local hum = char:WaitForChild("Humanoid")
        hum.WalkSpeed = 30
        hum.HipHeight = 3
    end)
    

    end

    setupSpecifiedPlayer()

    local spinAngle = 0

    local function updateAlts(dt) local baseCFrame = getTorsoCFrame(specifiedPlayer) local humanoidRoot = getHumanoidRootPart(specifiedPlayer) if not baseCFrame or not humanoidRoot then warn("Specified player torso or HumanoidRootPart not found") return end

    local velocity = humanoidRoot.Velocity
    local isMoving = velocity.Magnitude > SP_MOVE_THRESHOLD
    
    local downOffset = Vector3.new(0, -3.5, 0)
    local basePos = baseCFrame.Position + downOffset
    
    local baseRotation = baseCFrame - baseCFrame.Position
    
    local alt1_CFrame = CFrame.new(basePos) * baseRotation * baseRotationOffset
    
    local alt2_rotationOffset = baseRotationOffset * CFrame.Angles(math.rad(200), 0, 0)
    local alt2_CFrame = CFrame.new(basePos) * baseRotation * alt2_rotationOffset
    
    local alt3_rotationOffset = baseRotationOffset * CFrame.Angles(math.rad(-200), 0, 0)
    local alt3_CFrame = CFrame.new(basePos) * baseRotation * alt3_rotationOffset
    
    local leftOffset = alt1_CFrame.UpVector * 3
    local rightOffset = alt1_CFrame.UpVector * -5
    local verticalOffset = Vector3.new(0, 1, 0)
    
    alt2_CFrame = alt2_CFrame + leftOffset + verticalOffset
    alt3_CFrame = alt3_CFrame + rightOffset + verticalOffset
    
    local roll90 = CFrame.Angles(0, 0, math.rad(90))
    local rollOffsetRotation = baseRotation * baseRotationOffset * roll90
    local altDownOffset = Vector3.new(0, -1, 0)
    local rightVec = baseCFrame.RightVector
    
    local alt4Pos = basePos + (rightVec * -4) + altDownOffset
    local alt5Pos = basePos + (rightVec * 3) + altDownOffset
    
    if isMoving then
        spinAngle = (spinAngle + SPIN_SPEED * dt) % (2 * math.pi)
    end
    local spinRotation = CFrame.Angles(0, spinAngle, 0)
    
    local alt4_CFrame = CFrame.new(alt4Pos) * rollOffsetRotation * spinRotation
    local alt5_CFrame = CFrame.new(alt5Pos) * rollOffsetRotation * spinRotation
    
    setTorsoCFrame(altplayer1, alt1_CFrame)
    setTorsoCFrame(altplayer2, alt2_CFrame)
    setTorsoCFrame(altplayer3, alt3_CFrame)
    setTorsoCFrame(altplayer4, alt4_CFrame)
    setTorsoCFrame(altplayer5, alt5_CFrame)
    

    end RunService.Heartbeat:Connect(updateAlts)

  2. Assistant

    Certainly! To modify your script so that:

    • The effect starts only when specifiedPlayer says "q".
    • The effect stops and everything resets back to default when specifiedPlayer says "e".
    • While active, the script updates alt players as per your logic.
    • When stopped, restores players to default and stops updating.

    Here’s a version of your script that includes this control behavior.


    Key additions:

    • A boolean flag active = false.
    • Listen to specifiedPlayer.Chatted event.
    • When "q" is said, activate.
    • When "e" is said, deactivate (stop updating and reset players).
    • Modify the Heartbeat binding to only update if active is true.

    Full revised script with comments:

    local Players = game:GetService("Players")
    local RunService = game:GetService("RunService")
    
    local specifiedPlayer = Players:FindFirstChild("minifandesktop")
    local altplayer1 = Players:FindFirstChild("dekstopminikey")
    local altplayer2 = Players:FindFirstChild("desktopremotev")
    local altplayer3 = Players:FindFirstChild("desktopmousec")
    local altplayer4 = Players:FindFirstChild("desktopbook")
    local altplayer5 = Players:FindFirstChild("desktoptoolbox")
    
    if not (specifiedPlayer and altplayer1 and altplayer2 and altplayer3 and altplayer4 and altplayer5) then
        warn("One or more players not found!")
        return
    end
    
    local SP_MOVE_THRESHOLD = 0.1
    local SPIN_SPEED = 10
    
    local function getTorsoCFrame(player)
        local character = player.Character
        if character then
            local torso = character:FindFirstChild("Torso") or character:FindFirstChild("UpperTorso")
            if torso then
                return torso.CFrame
            end
        end
        return nil
    end
    
    local function getHumanoid(player)
        local character = player.Character
        if character then
            return character:FindFirstChildOfClass("Humanoid")
        end
        return nil
    end
    
    local function getHumanoidRootPart(player)
        local character = player.Character
        if character then
            return character:FindFirstChild("HumanoidRootPart")
        end
        return nil
    end
    
    local baseRotationOffset = CFrame.Angles(math.rad(-90), 0, math.rad(-90))
    
    local function setTorsoCFrame(player, cframe)
        if player.Character then
            local humanoid = player.Character:FindFirstChildOfClass("Humanoid")
            local torso = player.Character:FindFirstChild("Torso") or player.Character:FindFirstChild("UpperTorso")
            if torso then
                if humanoid then
                    humanoid.PlatformStand = true
                end
                torso.CFrame = cframe
            end
        end
    end
    
    local function resetTorsoCFrame(player)
        -- Resets torso to default (removes PlatformStand and does not forcibly set CFrame)
        if player.Character then
            local humanoid = player.Character:FindFirstChildOfClass("Humanoid")
            local torso = player.Character:FindFirstChild("Torso") or player.Character:FindFirstChild("UpperTorso")
            if humanoid then
                humanoid.PlatformStand = false
                humanoid.WalkSpeed = 16 -- default Roblox WalkSpeed, adjust if needed
                humanoid.HipHeight = 2 -- default HipHeight, adjust if you changed it earlier
            end
            -- We don't forcibly reset torso.CFrame because the player controls their character movement
        end
    end
    
    local function setupSpecifiedPlayer()
        local humanoid = getHumanoid(specifiedPlayer)
        if humanoid then
            humanoid.WalkSpeed = 30
            humanoid.HipHeight = 3
        end
    
        specifiedPlayer.CharacterAdded:Connect(function(char)
            local hum = char:WaitForChild("Humanoid")
            hum.WalkSpeed = 30
            hum.HipHeight = 3
        end)
    end
    
    setupSpecifiedPlayer()
    
    local spinAngle = 0
    local active = false -- the new "state" flag
    
    -- Update function called every Heartbeat step, only runs when active
    local function updateAlts(dt)
        if not active then return end -- only update if active
    
        local baseCFrame = getTorsoCFrame(specifiedPlayer)
        local humanoidRoot = getHumanoidRootPart(specifiedPlayer)
        if not baseCFrame or not humanoidRoot then
            warn("Specified player torso or HumanoidRootPart not found")
            return
        end
    
        local velocity = humanoidRoot.Velocity
        local isMoving = velocity.Magnitude > SP_MOVE_THRESHOLD
    
        local downOffset = Vector3.new(0, -3.5, 0)
        local basePos = baseCFrame.Position + downOffset
    
        local baseRotation = baseCFrame - baseCFrame.Position
    
        local alt1_CFrame = CFrame.new(basePos) * baseRotation * baseRotationOffset
    
        local alt2_rotationOffset = baseRotationOffset * CFrame.Angles(math.rad(200), 0, 0)
        local alt2_CFrame = CFrame.new(basePos) * baseRotation * alt2_rotationOffset
    
        local alt3_rotationOffset = baseRotationOffset * CFrame.Angles(math.rad(-200), 0, 0)
        local alt3_CFrame = CFrame.new(basePos) * baseRotation * alt3_rotationOffset
    
        local leftOffset = alt1_CFrame.UpVector * 3
        local rightOffset = alt1_CFrame.UpVector * -5
        local verticalOffset = Vector3.new(0, 1, 0)
    
        alt2_CFrame = alt2_CFrame + leftOffset + verticalOffset
        alt3_CFrame = alt3_CFrame + rightOffset + verticalOffset
    
        local roll90 = CFrame.Angles(0, 0, math.rad(90))
        local rollOffsetRotation = baseRotation * baseRotationOffset * roll90
        local altDownOffset = Vector3.new(0, -1, 0)
        local rightVec = baseCFrame.RightVector
    
        local alt4Pos = basePos + (rightVec * -4) + altDownOffset
        local alt5Pos = basePos + (rightVec * 3) + altDownOffset
    
        if isMoving then
            spinAngle = (spinAngle + SPIN_SPEED * dt) % (2 * math.pi)
        end
        local spinRotation = CFrame.Angles(0, spinAngle, 0)
    
        local alt4_CFrame = CFrame.new(alt4Pos) * rollOffsetRotation * spinRotation
        local alt5_CFrame = CFrame.new(alt5Pos) * rollOffsetRotation * spinRotation
    
        setTorsoCFrame(altplayer1, alt1_CFrame)
        setTorsoCFrame(altplayer2, alt2_CFrame)
        setTorsoCFrame(altplayer3, alt3_CFrame)
        setTorsoCFrame(altplayer4, alt4_CFrame)
        setTorsoCFrame(altplayer5, alt5_CFrame)
    end
    
    -- Reset all alts to default (remove PlatformStand and don't forcibly move torso)
    local function resetAllAlts()
        local altPlayers = {altplayer1, altplayer2, altplayer3, altplayer4, altplayer5}
        for _, player in pairs(altPlayers) do
            resetTorsoCFrame(player)
        end
        -- Also reset specifiedPlayer properties if you want:
        local humanoid = getHumanoid(specifiedPlayer)
        if humanoid then
            humanoid.WalkSpeed = 16
            humanoid.HipHeight = 2
            humanoid.PlatformStand = false
        end
    end
    
    -- Listen for chat commands from specifiedPlayer:
    specifiedPlayer.Chatted:Connect(function(msg)
        msg = msg:lower()
        if msg == "q" then
            if not active then
                print("Activating effect!")
                active = true
                -- Increase specifiedPlayer speed and height on activation
                local humanoid = getHumanoid(specifiedPlayer)
                if humanoid then
                    humanoid.WalkSpeed = 30
                    humanoid.HipHeight = 3
                end
            end
        elseif msg == "e" then
            if active then
                print("Deactivating effect!")
                active = false
                resetAllAlts()
            end
        end
    end)
    
    -- Connect update function to Heartbeat
    RunService.Heartbeat:Connect(updateAlts)
    

    Explanation:

    • The main update loop updateAlts early-exits if active is false.
    • When "q" is said, it sets active = true and boosts specifiedPlayer's stats.
    • When "e" is said, it sets active = false and resets the transform/state of all alt players and specifiedPlayer.
    • The alternative players’ humanoid PlatformStand is removed on reset, and default WalkSpeed and HipHeight are restored.
    • No movement or rotation is forced outside of active mode.

    Let me know if you want me to help package this as a ModuleScript/function or if you want custom tweaks!

  3. User

    also how to make that if specified player said q his hipheight will be set to 3 and walkspeed to 30 and when he said e his hipheight and walkspeed will be set to default

  4. Assistant

    That behavior is already mostly included in the script I provided, but to clarify and simplify just that part:

    • When the specified player says "q", set WalkSpeed = 30 and HipHeight = 3.
    • When the specified player says "e", reset WalkSpeed and HipHeight to defaults (usually 16 and 2 respectively).

    Here is an isolated snippet showing just that part for clarity:

    local function setSpecifiedPlayerBoosted()
        local humanoid = getHumanoid(specifiedPlayer)
        if humanoid then
            humanoid.WalkSpeed = 30
            humanoid.HipHeight = 3
        end
    end
    
    local function resetSpecifiedPlayerDefaults()
        local humanoid = getHumanoid(specifiedPlayer)
        if humanoid then
            humanoid.WalkSpeed = 16 -- default Roblox walk speed
            humanoid.HipHeight = 2   -- default Roblox hip height
        end
    end
    
    specifiedPlayer.Chatted:Connect(function(msg)
        msg = msg:lower()
        if msg == "q" then
            setSpecifiedPlayerBoosted()
        elseif msg == "e" then
            resetSpecifiedPlayerDefaults()
        end
    end)
    

    Integrate into the main script

    In the bigger script, inside the Chatted event you can add or keep these calls when activating/deactivating:

    if msg == "q" then
        if not active then
            active = true
            setSpecifiedPlayerBoosted()
        end
    elseif msg == "e" then
        if active then
            active = false
            resetAllAlts()
            resetSpecifiedPlayerDefaults()
        end
    end
    

    Default WalkSpeed and HipHeight values

    • Default WalkSpeed is usually 16
    • Default HipHeight is usually 2

    You can change these if your game uses different defaults.


    A full minimal example for reference:

    local Players = game:GetService("Players")
    
    local specifiedPlayer = Players:FindFirstChild("minifandesktop")
    
    local function getHumanoid(player)
        local character = player.Character
        if character then
            return character:FindFirstChildOfClass("Humanoid")
        end
        return nil
    end
    
    local function setSpecifiedPlayerBoosted()
        local humanoid = getHumanoid(specifiedPlayer)
        if humanoid then
            humanoid.WalkSpeed = 30
            humanoid.HipHeight = 3
        end
    end
    
    local function resetSpecifiedPlayerDefaults()
        local humanoid = getHumanoid(specifiedPlayer)
        if humanoid then
            humanoid.WalkSpeed = 16
            humanoid.HipHeight = 2
        end
    end
    
    specifiedPlayer.Chatted:Connect(function(msg)
        msg = msg:lower()
        if msg == "q" then
            setSpecifiedPlayerBoosted()
        elseif msg == "e" then
            resetSpecifiedPlayerDefaults()
        end
    end)
    

    Let me know if you want me to further combine this snippet with your whole original script!

  5. User

    also why altplayers jitter

  6. Assistant

    The jittering behavior of alt players in your script is likely because you are directly setting the Torso or UpperTorso CFrame of those players' characters every frame, which conflicts with the Roblox physics engine and the default animation system controlling those parts.

    Why does jittering happen?

    • Physics & Animation conflict: The humanoid's animations and Roblox's character controller constantly update parts like the torso during the physics simulation.
    • Directly setting CFrame every Heartbeat overrides or conflicts with these updates.
    • PlatformStand state disables some physics but may not eliminate jitter fully.
    • Network ownership and replication can also affect smooth updates if the player's character is being controlled by the client or server inconsistently.

    How to reduce or fix jitter?

    1. Use Humanoid:MoveTo or Motor6D manipulation instead of directly modifying Torso CFrame:

      Instead of forcibly setting the Torso.CFrame, consider:

      • Moving the whole character using HumanoidRootPart.CFrame
      • MORE advanced approach: Manipulate Motor6D joints (neck, root joint) to adjust relative position/rotation instead of setting torso's CFrame directly.
    2. Disable animations for alt players (or completely disable their humanoid animations) to prevent overriding.

    3. Set PlatformStand to true (already done) to disable character physics, which you do — but you still need to modify carefully.

    4. Update in RenderStepped instead of Heartbeat for smoother visuals (sometimes Heartbeat can introduce small timing issues).


    A common technique in Roblox to avoid jitter for such positioning:

    • Instead of forcibly setting the Torso's CFrame every frame, weld or Motor6D the altplayers' torso to your desired position relative to the specified player.

    • Create invisible Attachment points in alt players and specified player.

    • Use AlignPosition and AlignOrientation constraints to smoothly move alt players.

    • Or create WeldConstraints and adjust weld CFrames in a single step, rather than assigning torso CFrames every frame.


    Simple example using Welds instead of direct CFrame update:

    local function weldTorsoToCFrame(player, targetCFrame)
        local character = player.Character
        if not character then return end
        local torso = character:FindFirstChild("Torso") or character:FindFirstChild("UpperTorso")
        local humanoidRoot = character:FindFirstChild("HumanoidRootPart")
        if not torso or not humanoidRoot then return end
    
        -- Remove previous weld if exists
        local existingWeld = torso:FindFirstChild("TorsoWeldToTarget")
        if existingWeld then existingWeld:Destroy() end
    
        local weld = Instance.new("WeldConstraint")
        weld.Name = "TorsoWeldToTarget"
        weld.Part0 = torso
        weld.Part1 = workspace.Terrain -- using dummy or some fixed part, or just set weld CFrame below
        weld.Parent = torso
    
        -- Alternatively, create a Motor6D between HumanoidRootPart and Torso, and set it’s C0 to desired offset
    
        -- More complex approach: you need to weld torso relative to HumanoidRootPart and adjust weld C0 accordingly.
    
        -- Simple approach idea: instead of moving torso globally, move humanoidRootPart and torso together to desired position
    end
    

    However, this quickly becomes complicated.


    My suggestions to fix jitter:

    • Approach 1: Instead of setting torso.CFrame, set HumanoidRootPart.CFrame of alt players.

      Because the HumanoidRootPart is the main “root” of the character, setting its CFrame is smoother and expected.

    • Approach 2: Disable animations for alt players:

      local function disableAnimations(player)
          if player.Character then
              local humanoid = player.Character:FindFirstChildOfClass("Humanoid")
              if humanoid then
                  humanoid:ChangeState(Enum.HumanoidStateType.Physics)
                  for _, anim in pairs(humanoid:GetPlayingAnimationTracks()) do
                      anim:Stop()
                  end
              end
          end
      end
      
      disableAnimations(altplayer1)
      disableAnimations(altplayer2)
      disableAnimations(altplayer3)
      disableAnimations(altplayer4)
      disableAnimations(altplayer5)
      
    • Approach 3: Use AlignPosition and AlignOrientation constraints to move parts smoothly and let physics engine handle the motion.


    Example: Move alt players by setting HumanoidRootPart.CFrame

    Replace within your updateAlts(dt) function:

    local function setPlayerCFrame(player, cframe)
        if player.Character then
            local humanoid = player.Character:FindFirstChildOfClass("Humanoid")
            local hrp = player.Character:FindFirstChild("HumanoidRootPart")
            if humanoid and hrp then
                humanoid.PlatformStand = true
                hrp.CFrame = cframe
            end
        end
    end
    

    Then use setPlayerCFrame() instead of setTorsoCFrame() when positioning alt players.

    This usually results in less jitter than moving torso directly.


    Summary

    • Directly setting the Torso or UpperTorso's CFrame every frame causes jitter.
    • Better to move HumanoidRootPart instead.
    • Disable animations or use PlatformStand = true.
    • Consider using constraints (AlignPosition/AlignOrientation) and welds for smoother, physics-friendly movement.
    • Make sure network ownership is appropriate (server or the player controlling the character).

    If you want, I can help refactor your entire script to implement moving HumanoidRootPart for alt players instead — just ask!

  7. User

    can you integrate the full script whit last 2 changes?

  8. Assistant

    Certainly! Below is your full integrated script incorporating the latest two improvements:

    • The specifiedPlayer says "q" to activate: alt players follow with the effect, and specified player’s WalkSpeed/HipHeight set to boosted values.
    • The specifiedPlayer says "e" to deactivate: effect stops, alt players reset to default, and specified player’s WalkSpeed/HipHeight reset.
    • Alt players’ HumanoidRootPart.CFrame is set instead of the torso to reduce jitter.
    • Animations disabled for alt players (their playing animation tracks stopped).
    • PlatformStand enabled during the effect for alt players and disabled on reset.

    local Players = game:GetService("Players")
    local RunService = game:GetService("RunService")
    
    local specifiedPlayer = Players:FindFirstChild("minifandesktop")
    local altplayer1 = Players:FindFirstChild("dekstopminikey")
    local altplayer2 = Players:FindFirstChild("desktopremotev")
    local altplayer3 = Players:FindFirstChild("desktopmousec")
    local altplayer4 = Players:FindFirstChild("desktopbook")
    local altplayer5 = Players:FindFirstChild("desktoptoolbox")
    
    if not (specifiedPlayer and altplayer1 and altplayer2 and altplayer3 and altplayer4 and altplayer5) then
        warn("One or more players not found!")
        return
    end
    
    local SP_MOVE_THRESHOLD = 0.1
    local SPIN_SPEED = 10
    
    local function getHumanoid(player)
        local character = player.Character
        if character then
            return character:FindFirstChildOfClass("Humanoid")
        end
        return nil
    end
    
    local function getHumanoidRootPart(player)
        local character = player.Character
        if character then
            return character:FindFirstChild("HumanoidRootPart")
        end
        return nil
    end
    
    local function getTorsoCFrame(player)
        -- Using torso only to get base CFrame of specifiedPlayer (for offset calculations)
        local character = player.Character
        if not character then return nil end
        local torso = character:FindFirstChild("Torso") or character:FindFirstChild("UpperTorso")
        if torso then return torso.CFrame end
        return nil
    end
    
    local baseRotationOffset = CFrame.Angles(math.rad(-90), 0, math.rad(-90))
    
    local spinAngle = 0
    local active = false -- controls whether update is running
    
    -- Disable animations for alt players to reduce jitter
    local function disableAnimations(player)
        local humanoid = getHumanoid(player)
        if humanoid then
            humanoid:ChangeState(Enum.HumanoidStateType.Physics)
            for _, anim in pairs(humanoid:GetPlayingAnimationTracks()) do
                anim:Stop()
            end
        end
    end
    
    -- Use HumanoidRootPart CFrame to move alt players, and enable PlatformStand
    local function setPlayerCFrame(player, cframe)
        if player.Character then
            local humanoid = getHumanoid(player)
            local hrp = getHumanoidRootPart(player)
            if humanoid and hrp then
                humanoid.PlatformStand = true
                hrp.CFrame = cframe
            end
        end
    end
    
    -- Reset alt player to default: disable PlatformStand and enable animations
    local function resetPlayer(player)
        if player.Character then
            local humanoid = getHumanoid(player)
            if humanoid then
                humanoid.PlatformStand = false
                humanoid.WalkSpeed = 16 -- default WalkSpeed if needed
                humanoid.HipHeight = 2   -- default HipHeight if needed
                -- Optional: you can re-enable animations by letting Roblox start them normally again
            end
        end
    end
    
    -- Sets WalkSpeed and HipHeight for specifiedPlayer when active
    local function setSpecifiedPlayerBoosted()
        local humanoid = getHumanoid(specifiedPlayer)
        if humanoid then
            humanoid.WalkSpeed = 30
            humanoid.HipHeight = 3
        end
    end
    
    -- Reset specifiedPlayer WalkSpeed and HipHeight to default
    local function resetSpecifiedPlayerDefaults()
        local humanoid = getHumanoid(specifiedPlayer)
        if humanoid then
            humanoid.WalkSpeed = 16
            humanoid.HipHeight = 2
            humanoid.PlatformStand = false
        end
    end
    
    -- Reset all alt players
    local function resetAllAlts()
        local altPlayers = {altplayer1, altplayer2, altplayer3, altplayer4, altplayer5}
        for _, player in pairs(altPlayers) do
            resetPlayer(player)
        end
        resetSpecifiedPlayerDefaults()
    end
    
    -- Prepare specified player on spawn or now
    local function setupSpecifiedPlayer()
        local humanoid = getHumanoid(specifiedPlayer)
        if humanoid then
            humanoid.WalkSpeed = 16 -- start default (or set your preferred start)
            humanoid.HipHeight = 2
        end
    
        specifiedPlayer.CharacterAdded:Connect(function(char)
            local hum = char:WaitForChild("Humanoid")
            hum.WalkSpeed = 16
            hum.HipHeight = 2
        end)
    end
    
    setupSpecifiedPlayer()
    
    local function updateAlts(dt)
        if not active then return end   -- update only when active
    
        local baseCFrame = getTorsoCFrame(specifiedPlayer)
        local humanoidRoot = getHumanoidRootPart(specifiedPlayer)
        if not baseCFrame or not humanoidRoot then
            warn("Specified player torso or HumanoidRootPart not found")
            return
        end
    
        local velocity = humanoidRoot.Velocity
        local isMoving = velocity.Magnitude > SP_MOVE_THRESHOLD
    
        local downOffset = Vector3.new(0, -3.5, 0)
        local basePos = baseCFrame.Position + downOffset
    
        local baseRotation = baseCFrame - baseCFrame.Position
    
        local alt1_CFrame = CFrame.new(basePos) * baseRotation * baseRotationOffset
    
        local alt2_rotationOffset = baseRotationOffset * CFrame.Angles(math.rad(200), 0, 0)
        local alt2_CFrame = CFrame.new(basePos) * baseRotation * alt2_rotationOffset
    
        local alt3_rotationOffset = baseRotationOffset * CFrame.Angles(math.rad(-200), 0, 0)
        local alt3_CFrame = CFrame.new(basePos) * baseRotation * alt3_rotationOffset
    
        local leftOffset = alt1_CFrame.UpVector * 3
        local rightOffset = alt1_CFrame.UpVector * -5
        local verticalOffset = Vector3.new(0, 1, 0)
    
        alt2_CFrame = alt2_CFrame + leftOffset + verticalOffset
        alt3_CFrame = alt3_CFrame + rightOffset + verticalOffset
    
        local roll90 = CFrame.Angles(0, 0, math.rad(90))
        local rollOffsetRotation = baseRotation * baseRotationOffset * roll90
        local altDownOffset = Vector3.new(0, -1, 0)
        local rightVec = baseCFrame.RightVector
    
        local alt4Pos = basePos + (rightVec * -4) + altDownOffset
        local alt5Pos = basePos + (rightVec * 3) + altDownOffset
    
        if isMoving then
            spinAngle = (spinAngle + SPIN_SPEED * dt) % (2 * math.pi)
        end
        local spinRotation = CFrame.Angles(0, spinAngle, 0)
    
        local alt4_CFrame = CFrame.new(alt4Pos) * rollOffsetRotation * spinRotation
        local alt5_CFrame = CFrame.new(alt5Pos) * rollOffsetRotation * spinRotation
    
        -- Disable animations before setting CFrame to reduce jitter
        disableAnimations(altplayer1)
        disableAnimations(altplayer2)
        disableAnimations(altplayer3)
        disableAnimations(altplayer4)
        disableAnimations(altplayer5)
    
        -- Set alt players' HumanoidRootPart positions
        setPlayerCFrame(altplayer1, alt1_CFrame)
        setPlayerCFrame(altplayer2, alt2_CFrame)
        setPlayerCFrame(altplayer3, alt3_CFrame)
        setPlayerCFrame(altplayer4, alt4_CFrame)
        setPlayerCFrame(altplayer5, alt5_CFrame)
    end
    
    -- Listen for chat commands from specifiedPlayer:
    specifiedPlayer.Chatted:Connect(function(msg)
        msg = msg:lower()
        if msg == "q" then
            if not active then
                print("Activating effect!")
                active = true
                setSpecifiedPlayerBoosted()
            end
        elseif msg == "e" then
            if active then
                print("Deactivating effect!")
                active = false
                resetAllAlts()
            end
        end
    end)
    
    RunService.Heartbeat:Connect(updateAlts)
    

    What’s changed compared to your original?

    • The alt players are moved by setting HumanoidRootPart.CFrame instead of torso's CFrame.
    • Animations of alt players are stopped (calling disableAnimations) every update to avoid interference.
    • PlatformStand enabled for alt players while active; disabled on reset.
    • WalkSpeed and HipHeight of specifiedPlayer updated when effect toggled on/off with "q" and "e".
    • Safety checks for characters/humanoids added where needed.
    • Code kept modular with helper functions for clarity.

    Testing tips

    • Make sure the alt players actually have characters loaded.
    • If jitter persists, consider updating in RenderStepped (for smoother updates), but Heartbeat generally works fine.
    • Keep in mind network ownership roles in Roblox might cause lag or jitter if the server is setting player parts for other clients.

    If you want me to help with that setup or network ownership issues, or want me to optimize for multiple players / dynamic player lists — just ask!