Time Stop effect

I would check for parts that are currently un anchored and anchor them (and throw them into a table) and once the time stop has ended you can just look through the table and unachor them.

and maybe store velocity too.

The velocity is stored automatically by roblox,Try test in the test place.Also I am planning to do that soon

1 Like

Anyways, could I get the source code?

The source is the model itself,Go into the TimeStopper script,It’s where all of the thing managed,And inside the screen GUI this is where When you press the button,Its stop time

I’m on phone right now, so i cant check the scripts.

Its esentially 6 array of anchoring,Followed by a wait and 6 array of unanchoring

well It’s is not that complicated.The velocity of art is auto stored and body mover will not move,Its quite easy but i just want to save people time and focus more on other thing other than scripting!And for tweening,You could just pause()

For the last time, i said source code, not a very brief explanation.

I was curious about the code myself, so here’s the main script. He does have a smaller script but it’s just a debounce using a boolean value he stores in the workspace.

I don’t want to be mean to him because this is obviously one of the first scripts he’s ever written, but it pains me to think that he actually took the time to write this out.

workspace.Pause.Event:Connect(function()
	if script.Config.Effect.Value == true then--If you enable effect,You must add the color correction effect to the lightning
		game.Lighting.ColorCorrection.Contrast = -2
		print("Collor Corrected")
	end
	workspace.paused.Value = true
	for _, v in pairs(workspace:GetChildren()) do
		if v:IsA("BasePart") or v:IsA("UnionOperation") then
			v.Anchored = true
		elseif v:IsA("Model") or v:IsA("Folder") and game.Players:GetPlayerFromCharacter(v) == nil then
			if game.Players:GetPlayerFromCharacter(v) == nil then
				for _, v2 in pairs(v:GetChildren()) do
					if v2:IsA("BasePart") or v2:IsA("UnionOperation") then
						v2.Anchored = true
					elseif v2:IsA("Model") or v2:IsA("Folder") then
						for _, v3 in pairs(v2:GetChildren()) do
							if v3:IsA("BasePart") or v3:IsA("UnionOperation") then
								v3.Anchored = true
							elseif v3:IsA("Model") or v3:IsA("Folder") then
								for _, v4 in pairs(v3:GetChildren()) do
									if v4:IsA("BasePart") or v4:IsA("UnionOperation") then
										v4.Anchored = true
									elseif v4:IsA("Model") or v4:IsA("Folder") then
										for _, v5 in pairs(v4:GetChildren()) do
											if v5:IsA("BasePart") or v5:IsA("UnionOperation") then
												v5.Anchored = true
											elseif v5:IsA("Model") or v5:IsA("Folder") then
												for _, v6 in pairs(v5:GetChildren()) do
													if v6:IsA("BasePart") or v6:IsA("UnionOperation") then
														v6.Anchored = true
													elseif v6:IsA("Model") or v6:IsA("Folder") then

													end
												end
											end
										end
									end
								end
							end
						end
					end
				end
			end
		end
	end
	wait(30)
	for _, v in pairs(workspace:GetChildren()) do
		if v:IsA("BasePart") or v:IsA("UnionOperation") then
			if v.Name ~= script.Config.IgnoreName.Value then--If part is name after IgnoreName,Don't Unanchor it
				v.Anchored = false
			end
		elseif v:IsA("Model") or v:IsA("Folder") then
			if v.Name ~= script.Config.IgnoreName.Value then --If model is name after IgnoreName,Don't Unanchor it
				for _, v2 in pairs(v:GetChildren()) do
					if v2:IsA("BasePart") or v2:IsA("UnionOperation") then
						v2.Anchored = false
					elseif v2:IsA("Model") or v2:IsA("Folder") then
						for _, v3 in pairs(v2:GetChildren()) do
							if v3:IsA("BasePart") or v3:IsA("UnionOperation") then
								v3.Anchored = false
							elseif v3:IsA("Model") or v3:IsA("Folder") then
								for _, v4 in pairs(v3:GetChildren()) do
									if v4:IsA("BasePart") or v4:IsA("UnionOperation") then
										v4.Anchored = false
									elseif v4:IsA("Model") or v4:IsA("Folder") then
										for _, v5 in pairs(v4:GetChildren()) do
											if v5:IsA("BasePart") or v5:IsA("UnionOperation") then
												v5.Anchored = false
											elseif v5:IsA("Model") or v5:IsA("Folder") then
												for _, v6 in pairs(v5:GetChildren()) do
													if v6:IsA("BasePart") or v6:IsA("UnionOperation") then
														v6.Anchored = false
													elseif v6:IsA("Model") or v6:IsA("Folder") then

													end
												end
											end
										end
									end
								end
							end
						end
					end
				end
			end
		end
	end
	if script.Config.Effect.Value == true then--If you enable effect,You must add the color correction effect to the lightning
		game.Lighting.ColorCorrection.Contrast = 0
	end
	workspace.paused.Value = false

end)

Well yeah Its actually a recharging project,and i wrote this for fun,That’s why its not optimised and also this is not my first written script,Its just i’m lazy and instead of creating a new anchor script,I essentially take my anchor script which is similar and code some more.also you may ask why I use for loop instead of Getdescendant,Becuse you can configure every step of the anchoring process,Givin you more freedom,So you can make the 3rd layer of for loop not anchoring!

And while the code is very complicated,It’s also not that inefficient,I notice around <0.1ms(probobly replication lag) of lag before and after timestop And I dont want for it to be a complete system,Instead I want user to be able to expand on it like the time stop you did. Cheers :slight_smile:

You are not lazy, you are simply inexperienced because any truly lazy person would google this idea to see if something similar already exists then adapt what they find to their needs. As for your excuse to why it isn’t optimized, it doesn’t matter if you want to code for fun, you should never intentionally write unoptimized code to this magnitude.

And your understanding of GetDescendants simply doesn’t make sense. The idea of this script is to freeze the workspace, so just call GetDescendants on the workspace itself, not some random model in the workspace. But even then, if you want to call GetDescendants on a specific model, then you can get the model’s parent because you already have the model indexed.

1 Like

I heavily agree with this, that isn’t laziness, that’s pure inexperience and just well being bad

Using a single GetDescendants would be 100x better and looks way better.

If you do :IsA(“BasePart”) you don’t need to do unionoperation I think, because BasePart covers unions, parts and meshes.

2 Likes

don’t make me say this again, I am not adding every feature into what I made(why would I remake the system to prove that point)

technically it does stop unanchored parts so it counts as a time stop

my point is a time stop is easy to make, but a complete time stop system is more difficult

get my point now?

Tested and had a great time! Really cool. Need more things to explode

But doesn’t your account have to be over 13 to even get in the devforum?

well, the thing is, this system is nowhere near perfect either so even if you were to remake this it’d still lack all the features I listed, that’s what makes it truly hard. I could also create one part of some complex system but that doesn’t mean it’s easy to make.

this is what I’m trying to say, making a perfect time stop system is complicated.

oh my bad then
I thought you meant something different

1 Like

Yeah, that’s true. Maybe he took a link of his game that one of his younger friends sent him or a younger sibling?

I’ve redone your whole system, and added onto it for my own fun. I have also heavily commented the scripts to explain what you did wrong, and included comments on a few good practices you should be doing instead.

The things I’ve changed are:

  • It includes a button allowing the client to toggle the effect on and off.

  • I got rid of that weird string value ignore name system you had there and replaced it with an Ignored folder in the workspace, so any models or parts inside of the ignored folder will not be affected by the time stop.

  • It excludes players from the effect so you can walk around as the world around you is frozen.

  • Any sounds not inside of the ignored parts folder will be paused when it freezes and resumed when it unfreezes.

I’ve set it up demoing a free model being exploded with a sound effect that freezes a split second after it explodes.

Edit: Re-uploaded the file with a change that marks already anchored parts as such, so that it won’t un-anchor them in the second loop.
TimeStopper.rbxl (54.7 KB)

5 Likes