Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

Can RenderStepped Freeze a game?

Hi, so I'm trying to use RenderStepped to freeze a game when you die. More like crashing instead of death. Any pointers?

4 comments

0

This is a decent way of doing things, intresting fact is that loops without a yeild can run faster than the studio processes. This is usually why you crash when forgetting that wait()

0

why how nice, a crash your game! simulator

0

why dont u just kick them

0

If you want to crash their game, just do a while true do loop on the client.

2 answers

If you are looking for a freeze... lol i'm pretty sure this would work, sry if i'm wrong , maybe try it out? XD

-- local script
local RunService = game:GetService("RunService")
local player = game:GetService("Players").LocalPlayer
local playerGui = player:WaitForChild("PlayerGui")

local function CrashGame()
	-- something insane here like
	while true do
		local gui = Instance.new("ScreenGUI")
		local textLabel = Instance.new("TextLabel")
		textLabel.Text = "You have been owned"
		textLabel.Parent = gui
		gui.Parent = playerGui
	end
end

player.CharacterAdded:Connect(function(character)
	character:WaitForChild("Humanoid").Died:Connect(function()
		RunService:BindToRenderStep("Crash",1,CrashGame)
	end)
end)

RenderStepped can't freeze a game by itself. If you put it in a while loop without a wait() then it will crash. Any while loop without a wait() included will indeed crash the game because the while loop is running at least 100 times a second (by default there is about a .0000014 second delay between actions if no wait() is included in a while loop).

This discussion is preserved as it was. New answers, comments, and votes are closed.