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.
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.