PlyMeta not saving after map change?

For some reason, after map change my player meta function is not saving. IT saves when I overwrite it that map but not when I change it.

function plymeta:SetSpeed(slowed)
	local mul = 1
	if self:GetActiveWeapon():IsValid() and self:GetActiveWeapon():GetClass() == "weapon_ttt_katana" then
	self:SetRunSpeed(350 * mul)
	self:SetMaxSpeed(350 * mul)
	self:SetWalkSpeed(350 * mul)
		elseif slowed then
		self:SetWalkSpeed(120 * mul)
		self:SetRunSpeed(120 * mul)
		self:SetMaxSpeed(120 * mul)
		self:SetWalkSpeed(220 * mul)
		self:SetRunSpeed(220 * mul)
		self:SetMaxSpeed(220 * mul)

use player classes?

Then it becomes more complicated, I want to keep my code simple

This is probably because the gamemode’s function loads after yours does, you can fix this using the Initialize hook, or just by editing the function in the gamemode itself.

I’ll try the initialize hook but I am already editign the function in the gamemode (TTT)

use the hook “TTTPlayerSpeed”
the args are the player, and if they are slowed

Damn that’s new, that must’ve been added to TTT not too long ago.

OP use that hook and return the multiplier that you want in it and it’s solved

I forgot to mention that I tried that too. Nothing happened, not even errors.

What version of TTT are you running?
Have you tried adding prints?

The latest and Yeah I added prints. nothing called back.

Show some code