How to freeze the player's game on the client

Hello, this is my first post on the DevForum and the first thing i want to ask for is how to freeze the player’s game only for the client.

This is used in alot of games like Doors and many other.

This has to freeze the entire client with sounds and everything in the game if its possible.

1 Like

You mean crash the client? or just freeze in movement and the camera?

its like crashing the client but without closing it for an amount on seconds, and then unfreezing it that the game works normally like before

I use roblox for some years and never saw such a thing…

Do you mean streaming?

I believe this could be used with malicious intend, so I would rather not share any information on this topic.

1 Like

The client isn’t frozen. It’s all effects and it’s not supposed to lag your computer.

LocalScript in StarterPlayer → StarterCharacterScripts,
I couldnt figure out how to freeze the playing sounds

local Player = game:GetService("Players").LocalPlayer
local Character = Player.Character
local Camera = workspace.CurrentCamera

local FreezeEffect = function(Time)
	for i,v in pairs(Character:GetChildren()) do --// Freeze character
		if (v:IsA("BasePart")) then 
			v.Anchored = true
		end
	end --\\
	
	Camera.CameraType = Enum.CameraType.Scriptable --|| Freeze screen

	task.spawn(function() --// Unfreeze after Time passed
		task.wait(Time) 
		
		for i,v in pairs(Character:GetChildren()) do 
			if (v:IsA("BasePart")) then 
				v.Anchored = false
			end
		end
		
		Camera.CameraType = Enum.CameraType.Custom
		Camera.CameraSubject = Character.Humanoid
	end) --\\
end

while true do 
	task.wait(7)
	
	FreezeEffect(math.random(1, 3))
end

(It will freeze your game every 7 seconds for a random amount of time, you can just delete the while loop at the bottom to stop this.)

Try this maybe itll work [local script]

Time = 5 --Change the time to the seconds you want

function PauseGame()
    for i,v in pairs(game:GetDescendants()) do
        if v:IsA("BasePart") and v.Anchored == false then
            v.Name = v.Name.."PAUSED"
            v.Anchored = true
        elseif v:IsA("Sound") and v.Playing == true then
            v.Name = v.Name.."PAUSED"
            v.Playing = false
        end
       workspace.CurrentCamera.CameraType = Enum.CameraType.Scriptable
    end
    wait(Time)
    for i,v in pairs(game:GetDescendants()) do
        if v:IsA("BasePart") and v.Anchored == true then
            v.Name = string.split(v.Name,"PAUSED")[1]
            v.Anchored = false
        elseif v:IsA("Sound") and v.Playing == false then
            v.Name = string.split(v.Name,"PAUSED")[1]
            v.Playing = true
        end
        workspace.CurrentCamera.CameraType = Enum.CameraType.Custom
    end
end

PauseGame()
1 Like

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.