Un-intended bug with Time Stop script. (Visual bug.)

So here I am again asking for help as the time stop script I made has an un-intended bug. The player stopped in time can see the other player’s animations play. However they don’t know the true location of the user so it’s not that bad, just a visual bug.

Here’s some of the code to the time stop.

CODE
-- local script code
for _, player in pairs(Players:GetPlayers()) do
	local character = player.Character
		
	for _, track in pairs(character.Humanoid:GetPlayingAnimationTracks()) do
		track:AdjustSpeed(0)
		print("Adjusted ".. track.Name.. "'s speed to 0!")
		print("This affected ".. character.Name.."!")
	end
		
	character.HumanoidRootPart.Anchored = true
		
end
-- server code

for _, plr in pairs(Players:GetPlayers()) do
	TheWorldRE.TimeStop.TimeStopFX:FireClient(plr, plr)
	if plr ~= player then
		local char = plr.Character
		char.HumanoidRootPart.Anchored = true
		print("Anchored ".. char.Name.. " on the server!")			 
   TheWorldRE.TimeStop.TimeStopCL:FireClient(plr)
	end
end

I slightly changed the code and added a print to check if the code was even running and it did work, but I don’t know why it doesn’t affect everyone on the client.

Instead of firing it to all the clients if you’re doing it on the server you should be able to anchor them and get their playing animation tracks from the server.

I dont know much about animations, and I’m also in school so sorry.

If I did that then the time stop user would be affected as well.

I need it to be client sided to make the effect a lot cleaner.

Could you print if the Person who initiated the TimeStop is anchored or not in client?

That prints everyone in the server, it says that it affected Player1 the one who initiated the time stop and Player2. a victim of the time stop

The time stop has finally been functionally completed, by cloning the character and making them invisible.

I suggest not using anchoring with body forces in the future, unless handled on the server.

Anchored parts aren’t affected by physics.

“Determines whether a part is immovable by physics”

That’s not what I meant.

Let’s say you tell the client to anchor its own character once a timestop occurs, if the client affects its own character with a body force before it reaches the server, the positions won’t match.

I anchor on the server, the client only anchors users immune to time stop.

1 Like