I attached a mesh to the player through a weld constraint set to the Humanoid Root Part, in my game it scales up in size as you get stronger, to avoid it clipping through the ground I’m moving it up every time you scale up. The only problem is sometimes it will glitch your movement and teleport you back in place when it moves. How can I stop this while also keeping the mesh server side so it can be seen by everyone?
sizeValue.Value = math.min(sizeValue.Value + SIZE_INCREASE_PER_SECOND, MAX_PLAYER_SIZE_VALUE)
else
sizeValue.Value = math.max(sizeValue.Value - (math.round(SIZE_INCREASE_PER_SECOND / 4)), MIN_PLAYER_SIZE_VALUE)
end
local normalizedValue = (sizeValue.Value - MIN_PLAYER_SIZE_VALUE) / (MAX_PLAYER_SIZE_VALUE - MIN_PLAYER_SIZE_VALUE + EPSILON)
local hurricaneSize = MIN_HURRICANE_SIZE + (MAX_HURRICANE_SIZE - MIN_HURRICANE_SIZE) * normalizedValue
hurricaneSize = math.clamp(hurricaneSize, MIN_HURRICANE_SIZE, MAX_HURRICANE_SIZE)
local newSize = Vector3.new(hurricaneSize, hurricaneSize, hurricaneSize)
hurricaneMesh.Size = newSize
targetPosition = hrp.Position + Vector3.new(0, newSize.Y / 2, 0)
hurricaneMesh.Position = targetPosition
